home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / CIRRUS.TXT < prev    next >
Text File  |  1995-09-29  |  120KB  |  2,603 lines

  1.   Cirrus Logic
  2.  
  3.     CL-GD 410/420     (Also known as Video7 OEM)
  4.     CL-GD 510/520     Flat Panel/LCD
  5.     CL-GD 610/620     Flat Panel/LCD
  6.  
  7.     CL-GD 5320
  8.  
  9. The 64xx Flat Panel family:
  10.  
  11.     CL-GD 5410
  12.     CL-GD 6410    160pin  Flat Panel/LCD controller. 256k no banks.
  13.                           Supports 512 color TFT and 64 shades on mono STN
  14.     CL-GD 6412    160pin  As 6410 but mixed 3.3V and 5V
  15.     CL-GD 6420    160pin  As 6410 but 1MB. Supports 185000 colors on TFT
  16.                           and 64 shades on mono STN, color TFT
  17.     CL-GD 6416
  18.     CL-GD 6440    208pin  As 6420 but mixed 3.3V and 5V. Supports 8 and 16bit
  19.                           single- and dual-scan color STN, 9,12,15 and 18bit
  20.                           color TFT panels.
  21.     CL-GD 6450
  22.  
  23. The 54xx Super VGA family:
  24.  
  25.     CL-GD 5401        AVGA 1. No banks
  26.     CL-GD 5402        AVGA 2.
  27. Note: the 5401 and 5402 are sometimes sold as the Acumos AVGA1 and 2.
  28.     CL-GD 6205    160pin  Flat Panel/LCD. Mixed 3.3 and 5V. always 512KB
  29.                           64 shades on mono STN. Color TFT support
  30.     CL-GD 6215    160pin  As 6205 with Local bus and PI support
  31.     CL-GD 6225    160pin  As 6215 with single-scan color STN support
  32.     CL-GD 6235    160pin  As 6235 with dual-scan color STN support
  33.     CL-GD 6245
  34.  
  35.     CL-GD 5420    160pin  1MB 15/16 bit DAC.
  36.     CL-GD 5422    160pin  1MB 15/16/24bit DAC
  37.     CL-GD 5424    160pin  As 5422 with Local bus support
  38.     CL-GD 5426    160pin  As 5424 with 2MB and BitBLT
  39.     CL-GD 5428    160pin  As 5426 with faster BitBLT
  40.     CL-GD 5429    160pin  As 5428 with Memory Mapped I/O
  41.     CL-GD 5430    208pin  2MB  "Alpine" 64bit memory and 32bit BitBLT engine
  42.                                accelerates 8/16 it pixels
  43.     CL-GD 5432        "Alpine" 32bit version
  44.     CL-GD 5434    208pin  4MB  "Alpine" 64bit memory and BitBLT engine.
  45.                                accelerates 8/16/24/32 bit pixels
  46.     CL-GD 5452/3  208pin  4MB  64bit Highres truecolor controller
  47.                                Linedraw. 2 chip set (5453 is the DAC).
  48.     CL-GD 547x    future 3d accelerator chip
  49.  
  50.     CL-GD 7541    Nordic Lite. 2Mb LCD controller
  51.     CL-GD 7542    Nordic       2Mb LCD controller
  52.     CL-GD 7543    Viking       2Mb LCD controller?
  53.  
  54. Not too sure that the CL-GD5432, CL-GD6416 really exist
  55.  
  56. The 54xx and 64xx series have a built in RAMDAC. 8 bit for the 5401/5402 and
  57.  6410/12/20, 15/16bit for the 5420 and 6440 and 15/16/24 bit for the 5422-3x.
  58. The 54xx, 62xx and 6440 have built-in clock generator
  59.  
  60.  
  61. Support Chips:
  62.     CL-GD 6340    100pin  (Peacock) Color LCD Panel Driver. Supports 8, 512
  63.                              and 4K color panels. Onboard RAMDAC
  64.     CL-GD 5453    208pin  Palette DAC for the CL-GD5452
  65.  
  66.  
  67.  
  68. The 5xx/6xx Flat Panel family:
  69. This family strongly resembles the early Video 7 chips. Apparently Cirrus
  70. supplied at least one of the early Video 7 chips (Video7 OEM).
  71.  
  72. 3C4h index  6  (W):
  73. bit 0-7  Writing ("Eagle ID" rol 4) will disable extensions.
  74.          Writing "Eagle ID" will enable.
  75.          Reading will return 0 if extensions are disabled, 1 if enabled
  76. The "Eagle ID" is read from 3d4h index 1Fh
  77.  
  78. 3C4h index 80h (R/W):  Miscellaneous Control 1
  79.  
  80. 3C4h index 81h (R/W):  Graphics Position 1
  81.  
  82. 3C4h index 82h (R/W):  Graphics Position 2
  83.  
  84. 3C4h index 83h (R/W):  Attribute Controller Index
  85.  
  86. 3C4h index 84h (R/W):  Write Control
  87.  
  88. 3C4h index 85h (R/W):  Timing Control
  89.  
  90. 3C4h index 86h (R/W):  Bandwidth Control
  91.  
  92. 3C4h index 87h (R/W):  Miscellaneous Control 2
  93.  
  94. 3C4h index 88h (R/W):  Horizontal Sync skew
  95.  
  96. 3C4h index 89h (R/W):  CGA, HGC Font Control
  97.  
  98. 3C4h index 8Ah (R/W):  Reserved
  99.  
  100. 3C4h index 8Bh (R/W):  Screen B preset row scan
  101.  
  102. 3C4h index 8Ch (R/W):  Screen B start address high
  103.  
  104. 3C4h index 8Dh (R/W):  Screen B start address low
  105.  
  106. 3C4h index 8Eh (R):  Version Code
  107.  
  108. 3C4h index 8Fh (R):  Version Code
  109.  
  110. 3C4h index 90h (R/W):  Vertical Retrace Start
  111.  
  112. 3C4h index 91h (R/W):  Vertical Retrace End
  113.  
  114. 3C4h index 92h (R/W):  Lightpen High
  115.  
  116. 3C4h index 93h (R/W):  Lightpen Low
  117.  
  118. 3C4h index 94h (R/W):  Pointer Pattern Address High
  119. bit  0-7  Start address of the hardware cursor map in units of 256 bytes
  120.           within the last 64K of video memory
  121.  
  122. 3C4h index 95h (R/W):  Cursor Height Adjust
  123.  
  124. 3C4h index 96h (R/W):  Caret Width
  125.  
  126. 3C4h index 97h (R/W):  Caret Height
  127.  
  128. 3C4h index 98h (R/W):  Caret Horizontal Position High
  129.  
  130. 3C4h index 99h (R/W):  Caret Horizontal Position Low
  131.  
  132. 3C4h index 9Ah (R/W):  Caret Vertical Position High
  133.  
  134. 3C4h index 9Bh (R/W):  Caret Vertical Position Low
  135.  
  136. 3C4h index 9Ch M(R/W):  Pointer Horizontal Position
  137. bit 0-10  Cursor X position from left
  138.  
  139. 3C4h index 9Eh M(R/W):  Pointer Vertical Position High
  140. bit  0-9  Cursor Y position from top
  141.  
  142. 3C4h index A0h (R/W):  Graphics Controller Memory Latch 0
  143.  
  144. 3C4h index A1h (R/W):  Graphics Controller Memory Latch 1
  145.  
  146. 3C4h index A2h (R/W):  Graphics Controller Memory Latch 2
  147.  
  148. 3C4h index A3h (R/W):  Graphics Controller Memory Latch 3
  149.  
  150. 3C4h index A4h (R/W):  Clock Select
  151.  
  152. 3C4h index A5h (R/W):  Cursor (Caret and pointer) Attribute
  153. bit    7  Set to enable hardware cursor
  154.  
  155. 3C4h index A6h (R/W):  Internal Switch Source
  156.  
  157. 3C4h index A7h (R/W):  Status Switch Control
  158.  
  159. 3C4h index A8h (R/W):  NMI Mask 1
  160.  
  161. 3C4h index A9h (R/W):  NMI Mask 2
  162.  
  163. 3C4h index AAh (R/W):  Reserved
  164.  
  165. 3C4h index ABh (R):  NMI Status 1
  166.  
  167. 3C4h index ACh (R):  NMI Status 2
  168.  
  169. 3C4h index ADh (R/W):  256 Color mode Page Control
  170.  
  171. 3C4h index AEh (R):  NMI data cache (Four 24 bit words)
  172.  
  173. 3C4h index AFh (R/W):  Active Adapter State
  174.  
  175. 3C4h index B0h..BFh (R/W):  Scratch Registers
  176.  
  177. 3C4h index C0h..FFh (R/W):  Reserved
  178.  
  179. 3d4h index 0Ch (R/W):  Screen A start address Hi
  180. Must be cleared before the Eagle ID Register (3d4h index 1Fh) can be read.
  181.  
  182. 3d4h index 1Fh (R):  Eagle ID register
  183. bit 0-7  Eagle ID.  Used for test of 3C4h index 6.
  184.          Reading this register will return the content of 3d4h index 0Ch XORed
  185.          with the Eagle ID value.
  186.          ECh for CL-GD 510/520, CAh for 610/620. EAh for Video7 boards.
  187.  
  188. Memory locations:
  189.  
  190. $C000:$6  2 bytes  'CL'  if Cirrus Bios
  191.  
  192.   Modes for the CL-GD510/520:
  193.  
  194.   40h T  100   30
  195.   41h T  100   50
  196.   42h T  100   60
  197.   50h T  132   30
  198.   51h T  132   50
  199.   52h T  132   60
  200.   53h T   80   60
  201.   62h G  640  450  16
  202.   63h G  720  540  16
  203.   64h G  800  600  16
  204.  
  205.  
  206.   Other sources claim:
  207.  
  208.   15h T  132   25   2 (8x14)
  209.   16h T  132   44   2 (8x8)
  210.   18h T  132   30   2 (8x)
  211.   1Eh T  132   25  16 (8x8)
  212.   1Fh T  132   25  16 (8x14)
  213.   20h T  132   44  16 (8x8)
  214.   22h T  132   30  16 (8x)
  215.   31h T  100   37   2
  216.   40h G  720  540  16 PL4
  217.   50h G  640  400 256 packed
  218.   51h G  512  480 256 packed    Note: not supported in all BIOS'es
  219.   63h G  720  540  16 PL4
  220.   64h G  800  600  16 PL4
  221.   6Ah G  800  600  16 PL4
  222.  
  223.   Mode 50h and 51h use a special system where four pixels are stored at the
  224.   same byte address in plane 0,1,2 and 3 respectively.
  225.  
  226.  
  227.  
  228.  
  229. GD6349  (Peacock) Color LCD controller:
  230.  
  231. 3C4h index E0h (R/W):  Enable Readback Register
  232. bit  0-7  0: Turn Readback off, F0h: Enable Readback (ALLSET)
  233.  
  234. 3C4h index E9h (R):  Identification Register
  235. bit 4-7  Reads alternatingly as 7 and 8.
  236.  
  237.  
  238.  
  239. GD5410, 64xx series:
  240.  
  241. 100h (R/W):  CL-GD6440 Power Up Configuration                    (6440 only ?)
  242. bit    0  Local Bus width. Set for 32bit, clear for 16 bit (386SX)
  243.      1-2  CPU Bus Type.
  244.        3  Sleep address. Set for 46E8h, clear for 3C3h
  245.        7  Local Bus Clock. Set for x2 clock, clear for x1 clock.
  246. Note: This register can be accessed even when the CL-GD6440 is in sleep mode.
  247.  
  248. 3CEh index 0Ah (R/W):  Extension Control
  249. bit  0-7  Write ECh to enable extensions, CEh to disable.
  250.           Reads as 1 if enabled, 0 if not.
  251.  
  252. 3CEh index 0Bh (R/W):  Attribute Controller Index (ARX) r/w with toggle
  253. bit  0-4  Attribute Register Index
  254.        5  (not 6440 ?) Enable Video
  255.        7  Toggle ARX to Data. If set the Attribute register is in Data mode,
  256.           if clear in Index mode
  257.  
  258. 3CEh index 0Ch (R/W):  CR11 bit 7 at Extension
  259. bit    7  Write Protect 3d4h index 0-7 if set
  260.           Can be used to break the deadlock between 3d4h index 3 bit 7 and
  261.           3d4h index 11h bit 7 as this it can always be changed.
  262.  
  263. 3CEh index 0Dh (R/W):  CPU Base Address Control                     (not 6410)
  264. bit    0  Enable Page Remapping if set
  265.        1  Enable 64K Remapping page size if set, 32K if clear
  266.        2  If set use both 3CEh index 0Eh and 0Fh, if set use only index 0Eh:
  267.           Bit 2  Bit 1     Index 0Eh       Index 0Fh
  268.             0      0     A0000h-A7FFFh     Not used
  269.             0      1     A0000h-AFFFFh     Not used
  270.             1      0     A0000h-A7FFFh   A8000h-AFFFFh
  271.             1      1     A0000h-AFFFFh   B0000h-BFFFFh
  272.           Note: for bit 1&2 both set (dual 64k maps) 3CEh index 6 bits 2-3
  273.                 should be set to 0 to allow 128k video buffer.
  274.        4  (6440) Enable Linear Addressing if set. See index B1h for details
  275.        7  (not 6440) Enable I/O Ext Addr Remapping
  276. Note: this register can be locked by 3CEh index A7h bit 4.
  277.  
  278. 3CEh index 0Eh (R/W):  CPU Base Address Mapping Register A          (not 6410)
  279. bit  0-7  Bank number in 4K units for accesses to the A0000h-A7FFFh (index Dh
  280.           bit 1 clear) or A0000h-AFFFFh (index Dh bit 1 set) range.
  281.  
  282. 3CEh index 0Fh (R/W):  CPU Base Address Mapping Register B          (not 6410)
  283. bit  0-7  Bank number in 4K units. If 3CEh index 0Dh bit 2 is set this
  284.           register is used for accesses to the A8000h-AFFFFh (index Dh
  285.           bit 1 clear) or B0000h-BFFFFh (index Dh bit 1 set) range.
  286.  
  287. 3CEh index 30h (R/W):  Cell High Extension                       (6410 only ?)
  288. bit  0-4  Cell High Status
  289.        5  Vertical Blank Start bit 9 Status
  290.        6  Line Compare bit 9 Status
  291.        7  Scan Double Status
  292. Note: This register resembles 3d4h index 9 ??
  293.  
  294. 3CEh index 31h (R/W):  Cursor Start Extension                    (6410 only ?)
  295. bit  0-4  Cursor Start Status
  296.        5  Disable Cursor Status
  297. Note: This register resembles 3d4h index 0Ah
  298.  
  299. 3CEh index 32h (R/W):  Cursor End Extension                      (6410 only ?)
  300. bit  0-4  Cursor End Status
  301.      5-6  Cursor Skew Status
  302. Note: This register resembles 3d4h index 0Ah
  303.  
  304. 3CEh index 33h (R/W):  Underline Location Extension              (6410 only ?)
  305. bit  0-4  Underline Status
  306.        5  Count by 4 Status
  307.        6  Double Word Status
  308.  
  309. 3CEh index 34h (R/W):  Cursor Location Extension                   (5410 only)
  310. bit  0-3  Cursor Location Address bit 16-19
  311.  
  312. 3CEh index 60h (R/W):  Horizontal Total Extension
  313. bit  0-7  Horizontal Total in character clocks (-5).
  314.           Bit 8 is in 3CEh index 64h bit 5.
  315. Note: The indexes 60h-64h are the actual horizontal CRTC timing controls.
  316.       Index 83h bit 1 determines whether writes to the corresponding fields
  317.       in the 3d4h indexes should be reflected here.
  318.  
  319. 3CEh index 61h (R/W):  Horizontal Blank Start Extension
  320. bit  0-7  Horizontal Blank Start in character clocks.
  321.           Bit 8 is in 3CEh index 62h bit 7.
  322.  
  323. 3CEh index 62h (R/W):  Horizontal Blank End Extension
  324. bit  0-4  Horizontal Blank End Extension in character clocks
  325.        7  Horizontal Blank Start Extension bit 8. Bits 0-7 are in index 61h.
  326.  
  327. 3CEh index 63h (R/W):  Horizontal Retrace Start Extension
  328. bit  0-7  Horizontal Retrace Start in character clocks.
  329.           Bit 8 is in 3CEh index 64h bit 6.
  330.  
  331. 3CEh index 64h (R/W):  Horizontal Retrace End Extension
  332. bit  0-4  Horizontal Retrace End Extension in character clocks.
  333.        5  Horizontal Total Extension bit 8. Bits 0-7 are in index 60h.
  334.        6  Horizontal Retrace Start Extension bit 8. Bits 0-7 are in index 63h.
  335.        7  Horizontal Blank End bit 8. Bits 0-7 are in index 62h.
  336.  
  337. 3CEh index 70h (R/W):  Vertical Total Extension
  338. bit  0-7  Vertical Total in scanlines for a frame. This is the equivalent of
  339.           3d4h index 6. Bits 8-10 are in index 78h and 79h
  340. Note: The indexes 70h-75h, 78h and 79h are the actual vertical CRTC timing
  341.       controls. Index 83h bit 0 determines whether writes to the corresponding
  342.       fields in the 3d4h indexes should be reflected here.
  343.  
  344. 3CEh index 71h (R/W):  Vertical Display Enable Extension
  345. bit  0-7  Vertical Display Enable End. This is the equivalent of 3d4h index
  346.           12h. Bits 8-10 are in index 78h and 79h
  347.  
  348. 3CEh index 72h (R/W):  Vertical Blank Start Extension
  349. bit  0-7  Vertical Blank Start. This is the equivalent of 3d4h index 15h
  350.           Bits 8-10 are in index 78h and 79h.
  351.  
  352. 3CEh index 73h (R/W):  Vertical Blank End Extensions
  353. bit  0-7  Vertical Blank End. This is the equivalent of 3d4h index 16h
  354.           Bit 8 is in index 78h
  355.  
  356. 3CEh index 74h (R/W):  Vertical Retrace Start Extension
  357. bit  0-7  Vertical Retrace Start. This is the equivalent of 3d4h index 10h
  358.           Bits 8-10 are in index 78h and 79h.
  359.  
  360. 3CEh index 75h (R/W):  Vertical Retrace End Extension
  361. bit  0-3  Vertical Retrace End. This is the equivalent of 3d4h index 11h
  362.  
  363. 3CEh index 78h (R/W):  CR07 Extension
  364. bit    0  Vertical Total bit 8. Bits 0-7 are in index 70h
  365.        1  Vertical Display Enable bit 8. Bits 0-7 are in index 71h
  366.        2  Vertical Retrace Start bit 8. Bits 0-7 are in index 74h
  367.        3  Vertical Blank Start bit 8. Bits 0-7 are in index 72h
  368.        4  Line Compare bit 8.
  369.        5  Vertical Total bit 9
  370.        6  Vertical Display Enable bit 9.
  371.        7  Vertical Retrace Start bit 9
  372.  
  373. 3CEh index 79h (R/W):  Vertical Overflow beyond CR07
  374. bit    0  Vertical Total bit 10
  375.        1  Vertical Display Enable bit 10
  376.      2-3  Vertical Blank Start bit 9-10.
  377.        4  Vertical Retrace Start bit 10
  378.  
  379. 3CEh index 7Ah (R/W):  Coarse Vertical Retrace Skew for Interlaced
  380. bit  0-7  Coarse Vertical Retrace Skew for Interlaced Odd Fields in
  381.           Character Clock Periods.
  382.  
  383. 3CEh index 7Bh (R/W):  Fine Vertical Retrace Skew                 (not 6440 ?)
  384. bit  0-1  Fine Vertical Retrace Skew for Interlaced Odd Fields in Dot Clock
  385.           Periods
  386.  
  387. 3CEh index 7Ch (R/W):  Screen A Start Address Extension
  388. bit  0-3  Screen A Start Address Extension bits 16-19.
  389.           Bits 0-15 are in 3d4h index Ch and Dh
  390.  
  391. 3CEh index 80h (R/W):  H/V Retrace Polarity Control                 (not 5410)
  392. bit    1  (6440) Interlaced Mode Enable if set
  393.        2  (6440) Double Character Clock for Horizontal Parameters.
  394.           If set the Horizontal parameters will work as if they were twice
  395.           their actual value. This bit is used in extended 256 color modes.
  396.        4  Enable Expanded Graphics. If set a predetermined ratio (16 to 19) of
  397.           scanlines will be replicated in graphics modes.
  398.        5  H/V Polarity Source Control. If set bits 6-7 controls the Polarity
  399.           signals, if clear they are controlled by 3C2h bits 6-7.
  400.        6  Horizontal Retrace Polarity. Negative if set
  401.        7  Vertical Retrace Polarity. Negative if set.
  402.  
  403. 3CEh index 81h (R/W):  Display Mode                                 (not 6440)
  404. bit    0  (not 5410) Select LCD Display if set, CRT if clear
  405.        2  (6420,5410) Interlaced Mode Enable
  406.        3  (not 5410) Enable CL-GD6340 Mode
  407.        4  (not 5410) Select Single Scan Panel
  408.        5  (not 5410) Enable AutoMAP
  409.        7  (not 5410) Enable Simulscan
  410.  
  411. 3CEh index 82h (R/W):  Character Clock Selection
  412. bit  0-2  Character Clock Width. 1: 8pixels, 2:4pixels
  413.        3  Disable SR1[0] functionality. If set the Character Clock Width will
  414.           be determined by bits 0-2, if clear by 3C4h index 1 bit 0.
  415.      5-6  (5410) 0: 2 CRT-clkin, 1: 1, 2: 4
  416.        7  (6440) Enable Internal Divided by 2  if set (for Pixel Doubling)
  417.           This divides the CRT Master clock by 2. The Flat Panel clock is not
  418.           affected.
  419.  
  420. 3CEh index 83h (R/W):  Write Control
  421. bit    0  CRTC Vertical Parameters Write Protect. If set updates to the
  422.           standard CRTC vertical registers (3d4h index 6,7 (bit 0,2,3,5,7),
  423.            9 bit 5, 10h, 11h bit 0-3, 15h, 16h) will not be reflected in the
  424.           Vertical Working Set registers (index 70h-75h,78h,79h)
  425.        1  (6440) Horizontal Parameters Write Protect. If set updates to the
  426.           standard CRTC horizontal registers (3d4h index 0-5) will not be
  427.           reflected in the Horizontal Working Set registers (index 60h-64h)
  428.           (not 6440) CRTC Display Timing Effect Write Protect
  429.                      3d4h index 7 (bit 1,6), 9, 0Ah, 0Bh, 12h, 14h
  430.        2  (not 6440) CRTC Vertical Display End Effect Protect
  431.                      3d4h index 12h, 7 (bits 1,6)
  432.        3  (not 6440) CRTC Blank Effect Protect
  433.                      3d4h index 2, 3 bits 0-3, 5 bit 7, 7 bit 3, 9 bit 5,
  434.                       15h, 16h
  435.        4  (not 6440) CRTC Total/Retrace Effect Protect
  436.        6  (not 6440) Attribute Registers Write Protect (3C0h index 0-0Fh).
  437.  
  438. 3CEh index 84h (R/W):  Clock Select                                 (not 6440)
  439. bit    1  (not 5410) Clock In Divide by 2 if set.
  440.      2-5  Clock Select bits 0-3. If bit 7 is clear 3C3h bits 2-3 are used
  441.           for the two low clock bits.
  442.        7  Select bit 2-3 as clock bit 0-1 rather than 3C2h bit 2-3 if set.
  443.  
  444. 3CEh index 85h (R/W):  Virtual Switch Source                       (5410 only)
  445.      0-3  VGA Internal Switches for Analog Monitor
  446.        4  Enable Virtual Switches
  447.  
  448. 3CEh index 86h (R/W):  CRTC Test
  449. bit  1-3  (5410) CRTC Test Bits
  450.        4  CRTC Outputs Three-State Control. If set the HSYNMC and VSYNC
  451.           outputs will be three-stated.
  452.        5  (6412,40) HSYNC, VSYNC Disable. If set the HSYNC and VSYNC outputs
  453.           are disabled and driven to 0. Used in Flat Panel mode.
  454. Note: This register is intended for factory testing only.
  455.  
  456. 3CEh index 87h (R/W):  CRTC Spare Extension      (Rev B only)
  457. bit    1  (6412) PVSYNC Configuration
  458.                   Pin 82:    bit 4:    bit 1:    index 8Fh bit 4:
  459.                   LFS          0         0              0
  460.                   FPVDE        0         0              1
  461.                   VDE*         1         0              x
  462.                   PVSYNC       0         1              x
  463.        3  (6412) Enable Short VSYNC Total
  464.        4  (NOT 5410) VDE*/LFS Configuration on pin 99.
  465.                If set pin 99 is VDE*, if clear pin 99 is LFS
  466.        6  (6412) Enable short HTOT (HDE+7)
  467.        7  (6412) Enable short VTOT (VDE+4)
  468.           (6410,20) Invert VDE* Polarity on pin 99
  469.      6-7  (5410) Interlace Test 0-1
  470.  
  471. 3CEh index 89h (R/W):  CRTC Spare 1
  472.  
  473. 3CEh index 8Ah (R/W):  CRTC Spare 2
  474.  
  475. 3CEh index 8Fh (R/W):  CRTC BIOS Configuration                      (not 6440)
  476. bit  0-1  Clock Select Pin-out Configuration
  477.        2  (6412) If set SUSPEND* input, if clear FRA8 input
  478.        3  (6412) If set VDCLK I/O output, if clear FPVDCLK
  479.        4  (6412) If set FPVDE output, if clear LFS output
  480.        5  (6412) SUSPEND* pin Configuration. SUSPEND* if set, FRA8 if clear
  481.        6  (6412) Frame Accelerator Control bit. Set if the system power down
  482.                  the Frame Accelerator DRAM
  483.        7  (6412,20) Enable Retrace Line Clocks
  484.  
  485. 3CEh index 90h (R/W):  Display Memory Control
  486. bit    0  Scan Line Double Control. If set each scanline will be displayed
  487.           twice (typically 200 line modes).
  488.        1  RAS* Precharge. Extended (4 SQCLK cycles) if clear, normal (3 SQCLK
  489.           cycles) if set
  490.        2  (5410) DMC2
  491.        3  Display Memory Refresh Control Extension
  492.      5-6  (5410) DMC5-6
  493.        6  (6410 rev B,6420) Power Sequencing Status Bit.
  494. Note: The undefined bits should be set to 0 when writing this register.
  495.  
  496. 3CEh index 91h (R/W):  CRT Circular Buffer Policy Selection
  497. bit    5  Reset FIFO ?
  498.      6-7  (R)  Reserved
  499. Note: The undefined bits should be set to 0 when writing this register.
  500.  
  501. 3CEh index 92h (R/W):  Font Control
  502. bit  0-1  Font Control Address Extension bits 16-17. Also used for Bold font
  503.           selection ?
  504.        3  (6410,20) Enable Software Expanded Text
  505.        5  (not 5410) Enable Full Height Cursor. If set a full height cursor is
  506.           displayed regardless of the Cursor Start and Cursor End (3d4h index
  507.           Ah,Bh).
  508.        6  (not 5410) Text Expansion Method Select. If set scanlines 0,8 and 15
  509.           are duplicated, if clear scanline 0 is repeated twice and scanline
  510.           15 once. This is only active if bit 7 is set.
  511.        7  (not 5410) Enable Hardware Expanded Text. If set 16line text is
  512.           expanded to 19 line text by the method selected by bit 6.
  513.           This is only active in text modes.
  514.  
  515. 3CEh index 93h (R/W):  Full Frame-Accelerator Bottom-half Start         (6440)
  516. bit  0-7  Bottom Half Start Address
  517. Note: this register should not be modified by applications.
  518.  
  519. 3CEh index 93h (R/W):  CPU Interface Test Register                      (5410)
  520. bit  6-7  CTR6-7
  521.  
  522. 3CEh index 94h (R/W):  Full Frame-Accelerator Misc. Control 1           (6440)
  523. bit    0  Frame Accelerator Selection. Full if set, Half if clear
  524.      1-7  Should be set to 0
  525. Note: The undefined bits should be set to 0 when writing this register.
  526.  
  527. 3CEh index 95h (R/W):  CRTC Circular Buffer Delta and Burst
  528. bit  0-3  Delta number. Should be set to 0
  529.      4-7  Burst number. Should be set to 0
  530.  
  531. 3CEh index 96h (R/W):  Display Memory Control Test Register
  532. bit    0  Latch Monitor ID. If the screen is forced blank, and this bit is
  533.           set and then reset the monitor ID will be latched as it is on reset.
  534.           After one frame time without screen refresh the ID can be read from
  535.           index 9Ch
  536.        1  (6420) Frame Accelerator Three-State control
  537.           (6440,5410) Video Memory Data M1D, M3D Three-State Control.
  538.             If set the M0D and M2D busses will be three-stated
  539.        2  Video Memory Data M0D, M2D Three-State control. If set the M0D and
  540.           M2D busses will be three-stated
  541.        3  Video Memory & Address Three-State control. If set the Address and
  542.           Control pins of the Memory Sequencer (AA[0:8], AB[0:8], OE*, WE*,
  543.           RAS* and CAS*) will be three-stated.
  544.        4  (5410) Disable Fast-Page Mode
  545. Note: The undefined bits should be set to 0 when writing this register.
  546.  
  547. 3CEh index 97h (R):  Monitor Switches Read Back
  548. bit    0  (6440) 14MHz Clock Source. If set a 14MHz crystal is connected
  549.           across the XTAL1 and XTAL2 pins, if clear a 14MHz crystal is
  550.           connected to XTAL1.
  551.      3-7  (6440) Reserved for BIOS
  552.      4-7  (not 6440,5410) Panel Type Switches
  553.        7  (5410) Interlace
  554.  
  555. 3CEh index 98h (R/W):  Scratch
  556. bit  0-7  Reserved for BIOS use
  557.  
  558. 3CEh index 99h (R):  Configuration Register 0
  559. bit    0  BIOS address. If bits 1-2 are 0 (Local Bus) this is the data bus
  560.           width (set for 32bit, clear for 16) if bits 1-2 are 2 (ISA bus) this
  561.           is the BIOS support (C000h on adapter with BIOS support if clear,
  562.           C0000h or E0000h on motherboard with no BIOS support if set).
  563.        1  (5410) CPU Bus Type. 0: ISA, 1: MCA
  564.      1-2  (6440) CPU Bus Type. 0: Local Bus, 1: PI bus, 2: ISA bus
  565.        2  (not 6440) Disable VGA address space
  566.        3  Sleep at 46E8h if set, 3C3h if clear
  567.        4  BIOS is 16bit if set, 8bit if clear
  568.        5  (6440) VGA Address space. If set the VGA I/O addresses are decoded
  569.           at xxx instead of 3xx and yxxx instead of Axxx or Bxxx for video
  570.           memory
  571.        6  (6440) Disable ST100 Effect if set
  572.        7  (6440) CPU clock select/ISA I/O select. If bits 1-2 are 0 (Local
  573.           Bus) this is the CPU Clock Select (set x2 clock and CPURESET pin
  574.           activated, clear for x1 clock and CPURESET pin deactivated) if bits
  575.           1-2 are 1 (PI bus) this is the I/O select (I/O through the PI bus if
  576.           clear, I/O through ISA bus if set).
  577.  
  578. 3CEh index 9Ah (R/W):  Video Memory Configuration
  579. bit  0-7  (not 6440,5410) Reserved. should be programmed to 0.
  580.      0-2  (6440) Memory Width.
  581.             0: 32bit Memory bus with 4 CAS (8 256kx4 or 2 256kx16)
  582.      6-7  (5410) RAMDAC Select 0-1
  583.  
  584. 3CEh index 9Bh (R/W):  Miscellaneous Pin Configuration
  585. bit    0  Enable Sequencer Clock (SQCLK) inversion if set
  586.        1  On Chip Monitor Sense Enable if clear, disable if set ?
  587.      3-4  (not 6440,5410) INTERNAL/MOD Pin Configuration.
  588.                            0: INTERNAL, 1: MODULATION
  589.      5-6  (not 6440,5410) LLCLK/DE Configuration.
  590.                       0: LLCLK, 1: DE (for GD6340),
  591.                       3: Pins 98/99=PHSYNC/PVSYNC
  592.        7  (6412) Paged BIOS Disable.
  593.                  If set pins 62-64 are TIMER*, PO1 and SSCLK
  594.                  if clear pins 62-64 are BIOS address bit 13-15
  595. Note: The undefined bits should be set to 0 when writing this register.
  596.  
  597. 3CEh index 9Ch (R):  PS/2 Monitor ID Read-back
  598. bit  5-7  Monitor ID. 2: 8514, 5: 8503, 6: 8512/8513, 7: no monitor
  599.  
  600. 3CEh index 9Dh (R/W):  Miscellaneous Configuration 2               (6412 only)
  601. bit    0  FPVDCLK Delay. If set delay FPVDCLK by 1/2 Video Clock (VDCLK)
  602.        1  Select OE* Delay. If set OE* is delayed by one Memory Clock (SQCLK)
  603.        6  5v/3v Monitor Sense Select. 5V if set, 3.3V if clear
  604.        7  Select OSC as SQCLK.
  605.           If set SQCLK is derived from OSC, if clear from an input
  606.  
  607. 3CEh index 9Dh (R/W):  Configuration 1 Register                    (5410 only)
  608. bit  0-1  Bus Type
  609.        6  Use External SQCLK Synthesizer
  610.        7  Use External VDCLK Synthesizer
  611.  
  612. 3CEh index 9Eh (R/W):  Frame-Accelerator Even Frame Start Addr          (6440)
  613. bit  0-7  Frame-Accelerator Even Frame Start Address bits 12-19
  614. Note: should not be modified by applications.
  615.  
  616. 3CEh index 9Eh (R/W):  Display Memory Configuration High                (5410)
  617. bit  0-2  SQCLK Frequency
  618.      3-4  DRAM Width
  619.      5-7  DRAM Depth
  620.  
  621. 3CEh index 9Fh (R/W):  Frame-Accelerator Odd Frame Start Addr           (6440)
  622. bit  0-7  Frame-Accelerator Odd Frame Start Address bits 12-19
  623. Note: should not be modified by applications.
  624.  
  625. 3CEh index 9Fh (R/W):  Display Memory Configuration Low                 (5410)
  626. bit    0  DMCR0
  627.      1-3  Display Memory Bus Width
  628.      4-6  Display Memory Bus Depth
  629.  
  630. 3CEh index A0h (R/W):  Bus Interface Unit Control
  631. bit    0  Disable BIOS ROM (ignore accesses to C0000h-C7FFFh) if set
  632.        1  Disable Sleep Mechanism if set
  633.        2  (not 5410) Enable Write Protect RAMDAC if set
  634.        3  MEMCS16* Mode Select. If set A0000h-C7FFFh is decoded as 16bit, if
  635.           clear only the range used for the current mode is decoded as 16bit.
  636.        4  Enable 16bit Memory if set
  637.        5  (6440) Enable 16bit I/O if set
  638.        6  (5410) Enable 16bit I/O
  639.           (not 5410) Disable CPU Address Scramble (3C4h index 3 bits 1,3)
  640.             if set
  641.        7  (5410) Enable 16bit Interface in Planar Modes
  642.  
  643. 3CEh index A1h (R/W):  Three-State & Test Control
  644. bit    3  All other Output & I/O pins Three-State Control. If set all output
  645.           and I/O pins are three-stated
  646.        5  If set the CRTC Offset (3d4h index 13h) and Display Start Address
  647.           (3d4h index 0Ch,0Dh).are multiplied with 4.
  648.           Set in extended 256color modes.
  649.        7  (not 5410) Disable I/O Read if set. Must be set to access the
  650.             CL-GD6340.
  651. Note: The undefined bits should be set to 0 when writing this register.
  652.  
  653. 3CEh index A2h (R/W):  BIOS Page Selection                          (not 5410)
  654. bit  0-2  Select ROM BIOS Page
  655.  
  656. 3CEh index A6h (R/W):  Wait State Controls
  657. bit    0  Disable Memory Write Wait State Control. If set the READY* is forced
  658.           to synchronize with the CPU clock which adds one clock period.
  659.        1  Disable I/O Read Wait State if set, if clear one SQCLK period is
  660.           added.
  661.        2  Enable 0 Wait State for Memory Write if set
  662.        3  (not 6440) Disable RAMDAC I/O Wait State
  663.        4  Disable I/O Write Wait State if set,  if clear one SQCLK period is
  664.           added for I/O writes.
  665.        6  (not 5410) BIOS Wait-State Control. 0 Wait States if set
  666.        7  (R) Bus width Status Bit. 16bit if set, 8bit if clear
  667.  
  668. 3CEh index A7h (R/W):  General Programmable I/O Port Control        (not 5410)
  669. bit    0  (6440) Output pin PO0 (pin 103) Control
  670.        1  Output pin PO1 (pin 104) control
  671.        2  (6410,20,40) Output pin PO2 (pin 105) Control
  672.        3  (6440) Output pin PO3 (pin 106) Control
  673.        4  (6440) Write Protect 3CEh index 0Dh if set
  674.        6  (6440) Enable PO[3:0]. If set pins 103-106 is configured as outputs
  675.  
  676. 3CEh index A9h (R/W):  Bus Interface Unit Cache Control
  677. bit    0  (5410) Enable Read from Write FIFO
  678.        1  Enable Cache Read if set
  679.        2  (6440,5410) Enable Write Plane-Select Compaction in Write Mode 0 if
  680.           set
  681.        3  (6410,12,5410) Enable Write-Overwrite Compaction in modes 2,3
  682.        4  (5410) Enable 16bit Peripheral in Planar Modes
  683.      5-6  Internal BIU Timing to control delays
  684.  
  685. 3CEh index AAh (R):  Design Revision
  686. bit  0-3  Design Revision
  687.      4-7  Design ID (Major version):
  688.             4:  CL-GD6440
  689.             5:  CL-GD6412
  690.             6:  CL-GD5410
  691.             7:  CL-GD6420
  692.             8:  CL-GD6410
  693.  
  694. 3CEh index ABh (R/W):  Mask Revision                                (not 5410)
  695. bit  0-7
  696.  
  697. 3CEh index AEh (R/W):  Alternate Extension Decode High        (5410,6412 only)
  698. bit  0-7  Bits 8-15 of the value. Bits 0-7 are in index AFh
  699.  
  700. 3CEh index AEh (R/W):  Color Expansion Pixel Mask                  (6440 only)
  701. bit  0-7
  702.  
  703. 3CEh index AFh (R/W):  Alternate Extension Decode Low         (5410,6412 only)
  704. bit  0-7  Bits 0-7 of the value. Bits 8-15 are in index AEh
  705.  
  706. 3CEh index B0h (R/W):  Color Expansion Control                     (6440 only)
  707. bit    0  Enable Color Expansion if set (enables bit 2 ??)
  708.        1  Enable by 8 Address Mode if set. The CPU addresses are shifted left
  709.           by 8
  710.        2  Write Mode 4/5 Control. If set write mode 4 is selected where the
  711.           foreground color is written to each pixel where the corresponding
  712.           bit of the CPU data is set, if clear write mode 5 is selected where
  713.           each pixel is written with the foreground or background color
  714.           depending on the corresponding bit in the CPU data byte.
  715.        4  Enable Enhanced Writes for 16bit pixels if set. The CPU addresses
  716.           are shifted left 4 bits so that each bit corresponds to one pixel.
  717.           16 bytes can be copied by one CPU byte.
  718.  
  719. 3CEh index B1h (R/W):  Linear Address Map                          (6440 only)
  720. bit  0-3  Linear Address Map. Selects the address of the 1MB linear video
  721.           buffer. 0=no linear map, 1-15 map on corresponding MB boundary.
  722.  
  723. 3CEh index B2h W(R/W):  Foreground Color for Color Expansion       (6440 only)
  724. bit 0-15  Foreground color for color expansion in Write mode 4 and 5
  725.  
  726. 3CEh index B4h W(R/W):  Background Color for Color Expansion       (6440 only)
  727. bit 0-15  Foreground color for color expansion in Write mode 5
  728.  
  729. 3CEh index BAh (R/W):  Scratch Pad 0
  730. bit  0-7
  731.  
  732. 3CEh index BBh (R/W):  Scratch Pad 1
  733. bit  6-7  Video Memory:  0: 256K, 1: 512K, 2: 768K, 3: 1024K
  734.  
  735. 3CEh index BCh (R/W):  Scratch Pad 2
  736. bit  0-7
  737.  
  738. 3CEh index BDh (R/W):  Scratch Pad 3
  739. bit  0-7
  740.  
  741. 3CEh index BEh (R/W):  Scratch Pad 4
  742. bit  0-7
  743.  
  744. 3CEh index BFh (R/W):  Scratch Pad 5
  745. bit  0-7
  746.  
  747. 3CEh index C0h (R/W):  Attribute and Graphics Control
  748. bit    0  (not 5410) Enable Foreground Enhancement if set. The intensity bit
  749.           of the foreground color is XOR, except if the color is 0 or 8.
  750.        1  Bypass Internal Palette if set.
  751.        2  (6412) Enable 4bit Single-Scan Monochrome Panel Support
  752.           (6440) Attribute Emulation. If set the text mode attributes will be
  753.            changes as follows:
  754.              ForeGround shade > BackGround shade
  755.                       ForeGround = White and BackGround = Black
  756.              ForeGround shade < BackGround shade
  757.                       ForeGround = Black and BackGround = White
  758.           (5410) Disable 3C0h index 14h
  759.        3  Enable Background Color Enhancement if set.
  760.  
  761. 3CEh index C1h (R/W):  Cursor Attributes
  762. bit    0  Enable Cursor Blinking if clear
  763.      1-2  Cursor Blinking Rate
  764.        3  Cursor Mode. Invert if set, replace if clear
  765.        4  Invert Border Color if set
  766.        5  (not 5410) Cursor Color Control. If set the cursor is forced to
  767.           black and white
  768.  
  769. 3CEh index C2h (R/W):  Graphics Controller Memory Latch 0
  770. bit  0-7
  771.  
  772. 3CEh index C3h (R/W):  Graphics Controller Memory Latch 1
  773. bit  0-7
  774.  
  775. 3CEh index C4h (R/W):  Graphics Controller Memory Latch 2
  776. bit  0-7
  777.  
  778. 3CEh index C5h (R/W):  Graphics Controller Memory Latch 3
  779. bit  0-7
  780.  
  781. 3CEh index C8h (R/W):  RAMDAC Control
  782. bit    1  (6410,12,40) Select 16color Extended mode (Packed-pixel) if set
  783.        2  (6440) Enable 256 Color Modes if set (not 320x200 ?)
  784.        5  Enable Force Blank to RAMDAC if set
  785.        6  (6440) Grey Scale Data from Attribute registers if set
  786. Note: The undefined bits should be set to 0 when writing this register.
  787.  
  788. 3CEh index C9h (R/W):  Graphics and Attribute Test
  789. bit  0-2  (5410) GAT bits 0-2
  790.        3  (6410,12,40,5410) Enable 9dot Font if set. The ninth bit is taken
  791.           from plane 3 bit 7.
  792.        4  (not 6440) Three-State Pixel data & VDCLK
  793.        5  (6440) LSB value of Red and Blue and Green for HiColor modes.
  794.           In HiColor modes (bit 7 set) this bit is used as the LSB of the red,
  795.           blue and green (if bit 6 is clear) .
  796.           (5410) Red/Blue LSB
  797.        6  (6440) Select 15/16bit color. If set 16bit, if clear 15bit.
  798.           This bit is cleared when bit 7 is set
  799.           (5410) Green LSB
  800.        7  (6440,5410) Enable Direct (15/16bit) Color if set
  801.  
  802. 3CEh index D0h (R/W):  Flat Panel Column Offset                     (not 6440)
  803. bit  0-7  Bit 8 is in index D4 bit 0.
  804.  
  805. 3CEh index D1h (R/W):  Flat Panel Horizontal Displayed              (not 6440)
  806. bit  0-7  Bit 8 is in 3CEh index D4h bit 1
  807.  
  808. 3CEh index D2h (R/W):  Flat Panel Row Offset                        (not 6440)
  809. bit  0-7  Bits 8-9 are in 3CEh index D4 bits 2-3
  810.  
  811. 3CEh index D3h (R/W):  Flat Panel Vertical Size                     (not 6440)
  812. bit  0-7  Bits 8-10 are in 3CEh index D4h bit 4-6
  813.  
  814. 3CEh index D4h (R/W):  Flat Panel Overflow                          (not 6440)
  815. bit    0  Column Offset bit 8. Bits 0-7 are in index 60h
  816.        1  Panel Horizontal Displayed bit 8. Bits 0-7 are in index D1h
  817.      2-3  Row Offset Overflow bits 8-9. Bits 0-7 are in index D2h
  818.      4-6  Panel Vertical Size Overflow bits 8-10. Bits 0-7 are in index D3h.
  819.  
  820. 3CEh index D5h (R/W):  Flat Panel Attribute LCD Control             (not 6440)
  821. bit  0-1  9 Dots Text Reduction
  822.        2  (R) Stand-by Mode Status bit
  823.        3  Enable Attribute Emulation
  824.        4  Enable Extra Line Clk
  825.        5  Enable Reverse Video in Graphics Mode
  826.        6  Enable Reverse Video in Text Mode
  827.        7  Enable AutoMAP
  828.  
  829. 3CEh index D6h (R/W):  Flat Panel Grey Scale Offset                 (not 6440)
  830. bit    0  Select Grey Scale offset 4 (default=13)
  831.        1  Power Sequencing Control
  832.        2  Power Sequencing Time Control
  833.        4  (6420 & 6410 rev B) Enable 8bit Plasma Interface
  834.        5  (6420 & 6410 rev B) Enable Intermodulation
  835.        6  Enable Horizontal Stipling
  836.        7  Enable Vertical Stipling
  837.  
  838. 3CEh index D7h (R/W):  Flat Panel Retrace LLCLK Control             (not 6440)
  839. bit  0-4  Retrace LLCLK counter
  840.  
  841. 3CEh index D8h (R/W):  Flat Panel Frame Color                       (not 6440)
  842. bit  0-3  Frame Color
  843.        4  Enable Frame Color
  844.        6  (6410 rev B,12,20) Enable EPSON FPLCLK
  845.  
  846. 3CEh index D9h (R/W):  Flat Panel AC Modulation                     (not 6440)
  847. bit  0-7
  848.  
  849. 3CEh index DAh (R/W):  Flat Panel Display Control                   (not 6440)
  850. bit    0  (6420, 6410 rev B) Force 32 Grey Shades
  851.      1-2  Panel Vertical Alignment Control
  852.      3-4  Panel Size Selection
  853.      5-7  RGB Weight Control
  854.  
  855. 3CEh index DBh (R/W):  Standby Timer Control                        (not 6440)
  856. bit  0-5  Standby Mode Time Interval in minutes
  857.      6-7  Standby Mode. 0: disable, 1: screen save, 2: video memory
  858.  
  859. 3CEh index DCh (R/W):  Flat Panel Color Configuration               (not 6440)
  860. bit    0  9bit Color Panel Select
  861.        1  MOD/FPHDE/P8 pin function control. If set P8 is output,
  862.           if clear MOD is output if bit 0 is clear, FPHDE if set
  863.  
  864. 3CEh index E0h (R/W):  Flat Panel Column Offset                    (6440 only)
  865. bit  0-7  Bit 8 is in 3CEh index E4h bit 0.
  866.           0Ah will display the first pixel at the left edge of the display
  867.  
  868. 3CEh index E1h (R/W):  Flat Panel Horizontal Displayed Size        (6440 only)
  869. bit  0-7  The panel width in nibbles (4 pixels) (-1). 159 for 640 pixel.
  870.           Bit 8 is in index E4h bit 1.
  871.  
  872. 3CEh index E2h (R/W):  Flat Panel Row Offset                       (6440 only)
  873. bit  0-7  Starting row from the top. Bits 8-9 are in index E4h bit 2-3
  874.  
  875. 3CEh index E3h (R/W):  Flat Panel Vertical Size                    (6440 only)
  876. bit  0-7  Number of lines (-1) in the panel.
  877.           Bits 8-10 are in index E4h bit 4-6
  878.  
  879. 3CEh index E4h (R/W):  Flat Panel Overflow                         (6440 only)
  880. bit    0  Column Offset bit 8. Bits 0-7 are in index E0h
  881.        1  Panel Horizontal Displayed bit 8. Bits 0-7 are in index E1h
  882.      2-3  Row Offset Overflow bits 8-9. Bits 0-7 are in index E2h
  883.      4-6  Panel Vertical Size Overflow bits 8-10. Bits 0-7 are in index E3h
  884.  
  885. 3CEh index E5h (R/W):  Flat Panel Horizontal Centering Offset      (6440 only)
  886. bit  0-7  Number of nibbles (4pixels) between the end of line and the start of
  887.           the panel in 8dot video modes. Bit 8 is in index E7h bit 0
  888.  
  889. 3CEh index E6h (R/W):  Flat Panel Horizontal Centering Offset-9Dot (6440 only)
  890. bit  0-7  Number of nibbles (4pixels) between the end of line and the start of
  891.           the panel in 9dot video modes. Bit 8 is in index E7h bit 1
  892.  
  893. 3CEh index E7h (R/W):  Flat Panel Horizontal Centering Overflow    (6440 only)
  894. bit    0  Flat Panel Horizontal Centering bit 8. Bits 0-7 are in index E5h
  895.        1  Flat Panel Horizontal Centering (9Dot) bit 8. Bits 0-7 are in
  896.           index E6h
  897.        2  Flat Panel Horizontal Size Adjust. Set if the panel width is less
  898.           than that of the CRT, clear if panel width greater or equal to the
  899.           CRT width.
  900.  
  901. 3CEh index E8h (R/W):  Flat Panel Pin Configuration                (6440 only)
  902. bit    0  Standby/Suspend Pin Status. If set Standby Timer Status is output on
  903.           pin 152, if clear Suspend Mode Status is output on pin 152.
  904.        1  Enable FPHDE Control. If set the FPHDE signal will be active during
  905.           horizontal display and vertical retrace time, if clear it is active
  906.           during horizontal and vertical display time.
  907.        2  Flat Panel Drive. If set 100%, if clear 60%
  908.        3  GD6440 Core at 3 Volts. If set 5V, if clear 3.3V
  909.  
  910. 3CEh index E9h (R/W):  Flat Panel Type Control                     (6440 only)
  911. bit  0-2  Flat Panel Size Selection. 0: 640x480, 1: 640x400,
  912.             2: 1280x1024/1280x960
  913.        3  Flat Panel Scan Type. Set for single scan, clear for dual-scan.
  914.      5-6  Extra Line Clock Enable. 0,1: None, 2: 1 extra, 3: 2 extra line
  915.           clocks
  916.  
  917. 3CEh index EAh (R/W):  Flat Panel Power Control                    (6440 only)
  918. bit    0  (R) Power Sequence Status. Indicates if we are in the middle of a
  919.           flat panel power on/off sequence.
  920.        1  (R) Standby on Status
  921.        2  Sequencer Flat Panel Power. Set to sequence the flat panel on, clear
  922.           to sequence the panel off. The sequence takes app. 0.5 seconds.
  923.      3-5  Standby Mode Selection
  924.        6  Enable External Suspend Pin if set
  925.  
  926. 3CEh index EBh (R/W):  Flat Panel Standby Timer                    (6440 only)
  927. bit  0-7  Standby Timer interval in 15 second units.
  928.  
  929. 3CEh index ECh (R/W):  Flat Panel Misc 1 Control                   (6440 only)
  930. bit  0-1  Vertical Alignment Control. 0: Top, 1: Bottom, 2,3:Center
  931.        2  Enable Horizontal Centering if set
  932.        3  Grayscale Offset Value. set for 4, clear for 13
  933.           Set if a CL-GD6340 is present ??
  934.      4-5  Display Type Select. 0: CRT, 1: Flat Panel, 2,3: SimulSCAN
  935.        6  Grayscale Offset Pattern Select. Set for monochrome grayscale offset
  936.           values are used, if clear green grayscale offset values are used.
  937.        7  Invert FPVDE (Flat Panel Vertical Display Enable) if set
  938.  
  939. 3CEh index EDh (R/W):  Flat Panel Retrace FPCLK                    (6440 only)
  940. bit  0-4  Programmed Burst of Line Clocks. The number of line clocks during
  941.           retrace. The frequency is selected by bits 5-6
  942.      5-6  Retrace Line Clock Control
  943.        7  Fast Line Clock. If bit 5-6 are 3 this selects a fast line clock:
  944.           If set use a period of 64 MCLKs with a 16 MCLK pulse, if clear use a
  945.           period of 32 MCLKs with a pulse of 8 MCLKs.
  946.  
  947. 3CEh index EEh (R/W):  Flat Panel Test Control                     (6440 only)
  948. bit  0-7  Reserved
  949. Note: this register is used for testing and should not be used.
  950.  
  951. 3CEh index F0h (R/W):  Flat Panel Clock Control                    (6440 only)
  952. bit  0-3  FPVDCLK Control selects the clock for the display from MCLK
  953.      4-5  FPVDCLK Enable Control
  954.        6  Invert FPVDCLK (Flat Panel Video Clock Signal) if set
  955.        7  Invert FPHDE (Flat Panel Horizontal Display Enable) if set
  956.  
  957. 3CEh index F1h (R/W):  Flat Panel Data Control                     (6440 only)
  958. bit  0-4  Flat Panel Video Data Output Format Control
  959.        5  FPHSYNC/FPVSYNC Polarity Source Control. If set the sync polarity is
  960.           controlled by bits 6-7, if clear by 3C2h bits 6-7.
  961.        6  FPHSYNC Polarity Control. If set inverts the FPHSYNC (Flat Panel
  962.           Horizontal Sync)
  963.        7  FPVSYNC Polarity Control. If set inverts the FPVSYNC (Flat Panel
  964.           Vertical Sync)
  965.  
  966. 3CEh index F2h (R/W):  Flat Panel AC Modulation                    (6440 only)
  967. bit  0-7  The half period of the square wave output to the MOD pin in line
  968.           clocks. Usually does not divide evenly into the panel size.
  969.  
  970. 3CEh index F3h (R/W):  Flat Panel FPHSYNC Skew                     (6440 only)
  971. bit  0-6  FPHSYNC Skew in internal master clocks. Allows adjustment for
  972.           specific panels.
  973.  
  974. 3CEh index F4h (R/W):  Flat Panel FPVSYNC Skew                     (6440 only)
  975. bit  0-4  FPVSYNC Skew. Allows the end of FPVSYNC to be delayed 0..31
  976.        5  FPVSYNC Width. If set FPVSYNC is two line clocks, if clear one.
  977.      6-7  FPHSYNC Width. Adjust the width of FPHSYNC.
  978.  
  979. 3CEh index F5h (R/W):  Memory Clock Select Factor                  (6440 only)
  980. bit  0-4  Memory Clock Numerator "N"
  981.      5-7  Memory Clock Denominator "D"
  982.           The Memory Clock = 14.31818MHz * (N+)/(D+)
  983.  
  984. 3CEh index F6h (R/W):  CRT Clock Select "N" Factor                 (6440 only)
  985. bit  0-6  CRT Clock Numerator "N"
  986.        7  Clock Source Control. If set the CRT clock is determined by the
  987.           "N/D" formula, if clear by 3C2h bits 2-3.
  988. Note: The Video Clock = 14.31818MHz * (N+1)/((D+1) * (divide factor))
  989.  
  990. 3CEh index F7h (R/W):  CRT Clock Select "D" Factor                 (6440 only)
  991. bit  0-3  CRT Clock Denominator "D"
  992.      4-5  CRT Clock Divide
  993.        6  Memory Clock Inverted if set
  994.        7  CRT Clock Inverted if set
  995.  
  996. 3CEh index F8h (R/W):  Flat Panel Mapping RAM Pointer              (6440 only)
  997. bit  0-5  Pointer to the Mapping RAM for I/O Read/Write. Index into Mapping
  998.           RAM. Read and write via index F9h.
  999.        7  Enable I/O Access of Mapping RAM if set
  1000.  
  1001. 3CEh index F9h (R/W):  Flat Panel Mapping RAM Data                 (6440 only)
  1002. bit  0-7  Mapping RAM Data. Reads and writes to this register go to the byte
  1003.           in Mapping RAM selected by index F8h.
  1004.  
  1005. 3CEh index FAh (R/W):  Flat Panel Stippling Control                (6440 only)
  1006. bit    0  Enable 32 Shades in All Stippling Cases if set
  1007.      1-2  Stippling Select
  1008.      3-5  Stippling Bit Select
  1009.        6  Enable Inter-modulation if set. Should only be set on TFT color
  1010.           panels and if the stippling output is less than 4 bits.
  1011.  
  1012. 3CEh index FBh (R/W):  Flat Panel Color Control                    (6440 only)
  1013. bit    0  Blue Color Weighting. If set the weighting is (BLUE *2)/16.
  1014.           Used for sum2gray on monochrome panels.
  1015.        1  Green Color Weighting. If set the weighting is (GREEN*9)/16
  1016.      2-3  Red Color Weighting
  1017.        4  Green Data from LUT. If set only green data is output from the LUTs
  1018.           (Look Up Tables). Monochrome STN panels only
  1019.        5  Enable Reverse Video in Graphics Modes if set. Panels only
  1020.        6  Enable Reverse Video in Text Mode if set. Panels only.
  1021.  
  1022. 3CEh index FCh (R/W):  Flat Panel Frame Color 1                    (6440 only)
  1023. bit  0-3  Frame Color Bits for Red The Red component of the color for the
  1024.           non-displayed part of the panel (Border).
  1025.        4  Enable Frame Color if set
  1026.  
  1027. 3CEh index FDh (R/W):  Flat Panel Frame Color 2                    (6440 only)
  1028. bit  0-3  Frame Color Bits for Blue. The blue component of the color for the
  1029.           non-displayed part of the panel (Border).
  1030.      4-7  Frame Color Bits for Green. The Green component of the color for the
  1031.           non-displayed part of the panel (Border).
  1032.  
  1033.  
  1034. 3CEh index FEh (R/W):  Flat Panel Miscellaneous Spare 2          (6440 only ?)
  1035. bit  0-7  Reserved
  1036.  
  1037. Video Modes:
  1038.  
  1039. 002Dh  G   640   400   256  P8
  1040. 002Eh  G   640   480   256  P8
  1041. 002Fh  G   648   480   256  P8      ;Weird resolution
  1042. 0030h  G   800   600   256  P8
  1043. 0037h  G  1024   768    16  PL4
  1044. 0041h  T   100    50    16  TXT
  1045. 0042h  T   100    60    16  TXT
  1046. 0044h  T   100    25    16  TXT
  1047. 0051h  T   132    50    16  TXT
  1048. 0052h  T   132    60    16  TXT
  1049. 0053h  T    80    60    16  TXT
  1050. 0054h  T   132    25    16  TXT
  1051. 0064h  G   800   600    16  PL4
  1052. 006Ah  G   800   600    16  PL4
  1053.  
  1054.  
  1055.  
  1056.  
  1057. GD62xx series:
  1058. The 62xx series is very similar to the early 54xx.
  1059. The 62xx series can display simultaneously on CRT and LCD (SimulSCAN).
  1060. The 62xx series always has 512KB. Mixed 3.3V and 5V. Pixel clock up to 65MHz
  1061.  (5V) or 40MHz (3.3V).
  1062. There are two extra register banks (CX and RX) at 3d4h. How to select ?
  1063.  
  1064. 3C4h index  2  (R/W):  Map Mask
  1065. bit  0-7  Enable writing pixel bits 0-7  ?????
  1066. Note: See the VGA section for the normal use of this register
  1067.  
  1068. 3C4h index  6  (R/W):  Unlock ALL Extensions
  1069. bit  0-2,4  Writing 12h to this register enables extensions.
  1070.             Read back 0Fh if locked.
  1071.             Bits 3,5-7 are ignored on write.
  1072.  
  1073. 3C4h index  7  (R/W):  Extended Sequencer Mode
  1074. bit    0  Enable High-Resolution 256 Color modes if set
  1075.      4-6  (R) Configuration switch 0-2 (MD[14:12])
  1076.  
  1077. 3C4h index  8  (R/W):  Miscellaneous Control
  1078. bit  0-2  Switch 1-3 Readback (Panel type, Monitor type, Local bus config).
  1079.        3  Select active polarity of input SUSPEND for suspend mode.
  1080.          .If set low is true, if clear high is true (default at reset).
  1081.        4  Enable IO(60h) read detect to reset backlight timer
  1082.        5  Enable IO(60h) read detect to reset standby timer
  1083.        6  Disable MSC16* for Display Memory
  1084.        7  Select symmetrical DRAM addressing for paged-mode on CRT
  1085.           Set when using DRAM 9-bit addressing at 132 col CRT
  1086.  
  1087. 3C4h index  9  (R/W):  Scratch Register 0
  1088. bit    0  Set to center
  1089.      2-4  Monitor type.
  1090.            0:  31,5kHz           Std VGA. IBM 8512,8503
  1091.            1:  31.5, 35.5 kHz    IBM 8514
  1092.            2:  31.5, 35.1 kHz    NEC 2A
  1093.            3:  31.5 - 35.5 kHz   NEC II
  1094.            4:  31.5 - 38 kHz     Multi Freq. NEC 3D
  1095.            5:  31.5 - 48 kHz     Sony CPD-1304, NEC 3FG, Nanao 9065S, 9070U
  1096.            6:  31.5 - 56.5 kHz   NEC 4D,4FG, Nanao T240i
  1097.            7:  31.5 - 64 kHz     NEC 5D,5FG/6FG, Nanao T560i,T660i
  1098.        7  Panel frequency
  1099.  
  1100. 3C4h index 0Ah (R/W):  Scratch Register 1
  1101. bit    0  Display mode
  1102.        1  Disable expand
  1103.        2  Enable 16bit mode.
  1104.        4  Attribute emulation
  1105.        5  Disable bold font
  1106.        6  High refresh
  1107.        7  Voltage
  1108.  
  1109. 3C4h index 0Bh (R/W):  VCLK 0 Numerator Register
  1110. bit  0-6  VCLK 0 Numerator bits 0-6
  1111.  
  1112. 3C4h index 0Ch (R/W):  VCLK 1 Numerator Register
  1113. bit  0-6  VCLK 1 Numerator bits 0-6
  1114.  
  1115. 3C4h index 0Dh (R/W):  VCLK 2 Numerator Register
  1116. bit  0-6  VCLK 2 Numerator bits 0-6
  1117.  
  1118. 3C4h index 0Eh (R/W):  VCLK 3 Numerator Register
  1119. bit  0-6  VCLK 3 Numerator bits 0-6
  1120.  
  1121. 3C4h index 0Fh (R/W):  DRAM Control
  1122. bit  0-1  MCLK Select: 0: 50.1 MHz, 1: 44.7 MHz, 2: 25.0 MHz, 3: 37.5 MHz
  1123.           Select 25MHz if VCLK is <= 18MHz
  1124.        2  RAS* Timing.
  1125.               0: Extended (PD on MD[27], RAS* high for 3MCLK, low for 4)
  1126.               1: Standard (RAS* high for 2.5MCLK, low for 3.5)
  1127.        5  CRT Write Buffer Depth Control
  1128.           If set there are 4 16bit levels, if clear one 16bit level.
  1129.        7  CRT Refresh disabled if set (LCD mode)
  1130.           (5434)
  1131.  
  1132. 3C4h index 10h (R/W):  HW Cursor X-position
  1133. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1134.           index register are taken as the low order bits of an 11 bit
  1135.           register. This is the horizontal position of the hardware cursor in
  1136.           pixels.
  1137.  
  1138. 3C4h index 11h (R/W):  HW Cursor Y-position7
  1139. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1140.           index register are taken as the low order bits of an 11 bit
  1141.           register. This is the vertical position of the hardware cursor in
  1142.           pixels.
  1143.  
  1144. 3C4h index 12h (R/W):  HW Cursor control
  1145. bit    0  Enable the hardware cursor if set
  1146.        1  Enable Access to RAMDAC Extended Colors.
  1147.           Set to load special color values via 3C8h and 3C9h.
  1148.           When this bit is set palette entry 0 accesses the cursor background
  1149.           color and entry FFh accesses the cursor foreground color.
  1150.  
  1151. 3C4h index 13h (R/W):  HW Cursor bitmap address
  1152. bit  0-1  Select 1 of 4 32x32 cursors
  1153.           The offset in 256 byte units within the last 16KB of video memory
  1154.           where the cursor mask and shape bitmaps are stored.
  1155.           There are two 128 byte (32x32 bits) bitmaps stored in video memory.
  1156.           The appearance of the cursor at each pixel is determined by a
  1157.           combination of the corresponding pixels from the first and second
  1158.           bitmap:
  1159.             1st: 2nd:
  1160.              0    0     The original screen pixel is shown (invisible cursor)
  1161.              0    1     The pixel is shown in the cursor background color.
  1162.              1    0     The pixel is shown as the inverse of the original
  1163.                         screen pixel (XOR cursor)
  1164.              1    1     The pixel is shown in the cursor foreground color.
  1165.  
  1166. 3C4h index 14h (R/W):  Scratch-Pad 2
  1167. bit  0-7  Reserved
  1168.  
  1169. 3C4h index 15h (R/W):  Scratch-Pad 3
  1170. bit  0-7  Reserved
  1171.  
  1172. 3C4h index 16h (R/W):  Miscellaneous
  1173. bit  0-7  Reserved
  1174.  
  1175. 3C4h index 19h (R/W):  Scratch-Pad 4
  1176. bit  0-7  Reserved
  1177.  
  1178. 3C4h index 1Ah (R/W):  Miscellaneous
  1179. bit    4  Enable 64x64 H/W cursor
  1180.        5  Enable Improved cycle latency
  1181.        6  Select dual-scan color panel
  1182.        7  Select one DRAM refresh per line
  1183.  
  1184. 3C4h index 1Bh (R/W):  VCLK 0 Denominator & Post
  1185. bit    0  VCLK 0 Post Scalar bit. Divide clock by 2 if set
  1186.      1-5  VCLK 0 Denominator Data
  1187. Note: The clock is (14.31818MHz * numerator (index 0Bh))/Denominator.
  1188.       Divide by 2 if the Post Scalar bit is set.
  1189.       3C2h bits 2-3 selects between VCLK0, 1, 2 and 3
  1190.       The 5420 can not handle frequencies above 75.2 MHz
  1191.  
  1192. 3C4h index 1Ch (R/W):  VCLK 1 Denominator & Post
  1193. bit    0  VCLK 1 Post Scalar bit. Divide clock by 2 if set
  1194.      1-5  VCLK 1 Denominator Data
  1195. Note: See index 1Bh for the frequency calculation
  1196.  
  1197. 3C4h index 1Dh (R/W):  VCLK 2 Denominator & Post
  1198. bit    0  VCLK 2 Post Scalar bit. Divide clock by 2 if set
  1199.      1-5  VCLK 2 Denominator Data
  1200. Note: See index 1Bh for the frequency calculation
  1201.  
  1202. 3C4h index 1Eh (R/W):  VCLK 3 Denominator & Post
  1203. bit    0  VCLK 3 Post Scalar bit. Divide clock by 2 if set
  1204.      1-5  VCLK 3 Denominator Data
  1205. Note: See index 1Bh for the frequency calculation
  1206.  
  1207. 3C4h index 1Fh (R/W):  BIOS Write Enable and MCLK select
  1208. bit  0-5  MCLK frequency bit 0-5
  1209.  
  1210. 3CEh index  0  (R/W):  Set/Reset
  1211. bit  0-3  Write Mode 5 background color bits 0-3
  1212.      4-7  Write Mode 5 background color bits 4-7
  1213. Note: See the VGA section for the use of this register in write mode 0-3
  1214.  
  1215. 3CEh index  1  (R/W):  Enable Set/Reset
  1216. bit  0-3  Write Mode 4/5 foreground color bits 0-3
  1217.      4-7  Enable SR plane 0-3 or Write Mode 4/5 foreground color bits 0-3
  1218. Note: See the VGA section for the use of this register in write mode 0-3
  1219.  
  1220. 3CEh index  5  (R/W):  Mode
  1221. bit  0-1  Write mode:  See the VGA section for modes 0-3.
  1222.        2  Write mode bit 2 if 3CEh index 0Bh bit 2 is set
  1223.            mode 4:  Foreground write ?
  1224.            mode 5:  Fore and background write
  1225.        3  Enable Read Color Compare
  1226.        4  Enable odd/even (3C4h index 4 bit 2).
  1227.        5  Shift 2 bits per byte
  1228.        6  256 Color Mode
  1229.  
  1230. 3CEh index 09h (R/W):  Offset Register 0
  1231. bit  0-6  4k Primary/Low bank number
  1232.           If 3CEh index 0Bh bit 0 is set references to A000h-A7FFh use this
  1233.           bank register. If clear references to A000h-AFFFh use this bank
  1234.           register.
  1235.  
  1236. 3CEh index 0Ah (R/W):  Offset Register 1
  1237. bit  0-6  4k High bank number
  1238.           If 3CEh index 0Bh bit 0 is set references to A800h-AFFFh use this
  1239.           bank register.
  1240.  
  1241. 3CEh index 0Bh (R/W):  Extension Control
  1242. bit    0  If set references to A000h-A7FFh use 3CEh index 9 as bank register,
  1243.           and references to A800h-AFFFh use 3CEh index 0Ah as bank register.
  1244.           If clear all references to A000h-AFFFh use 3CEh index 9 as bank
  1245.           register.
  1246.        1  Enable BY8 Addressing for 256 color modes
  1247.        2  Enable Extended Write Modes if set (mode 4 and 5)
  1248.  
  1249. 3d4h index 00h (R/W):  Horizontal Total (CX00)
  1250. bit  0-7  Horizontal Total (-5)
  1251. Note: This register is used in 80 column and mode 13h (3C4h index 1 bit 3
  1252.       clear or 3CEh index 5 bit 6 set)
  1253.  
  1254. 3d4h index 01h (R/W):  Horizontal Total (CX01)
  1255. bit  0-7  Horizontal Total (-5)
  1256. Note: This register is used in 50 column modes (3D4h index 1 bit 3 set or 3CEh
  1257.       index 5 bit 6 clear)
  1258.  
  1259. 3d4h index 02h (R/W):  LFS Signal Vertical Counter Value Compare (CX02)
  1260. bit  0-7  Used if autocentering is not selected.
  1261. Note: This register selected for 3C2h bits 2-3 = 3 ??
  1262.  
  1263. 3d4h index 03h (R/W):  LFS Signal Vertical Counter Value Compare (CX03)
  1264. bit  0-7  Used if autocentering is not selected.
  1265. Note: This register selected for 3C2h bits 2-3 = 2 ??
  1266.  
  1267. 3d4h index 04h (R/W):  LFS Signal Vertical Counter Value Compare (CX04)
  1268. bit  0-7  Used if autocentering is not selected.
  1269. Note: This register selected for 3C2h bits 2-3 = 1 ??
  1270.  
  1271. 3d4h index 05h (R/W):  LFS Signal Vertical Counter Value Compare (CX05)
  1272. bit  0-7  Used if autocentering is not selected.
  1273. Note: This register selected for 3C2h bits 2-3 = 0 ??
  1274.  
  1275. 3d4h index 06h (R/W):  LFS Overflow (CX06)
  1276. bit  0-1  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 3
  1277.      2-3  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 2
  1278.      4-5  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 1
  1279.      6-7  Bits 8-9 of the LFS compare for 3C2h bits 2-3 = 0
  1280.  
  1281. 3d4h index 06h (R/W):  Vertical Total (RX06)
  1282. bit  0-7  Vertical Total (-2)
  1283.  
  1284. 3d4h index 07h (R/W):  Color TFT Panel Control Signal (CX07)
  1285. bit    0  If set FPVDCLK is always active, if clear FPVDCLK is gated by
  1286.           display enable
  1287.        1  FPVDCLK is inverted if set
  1288.        2  If set use LLCLK as HSYNC
  1289.        3  If set use LFS as VSYNC
  1290.  
  1291. 3d4h index 07h (R/W):  Vertical Overflow (RX07)
  1292. bit    0  Vertical Total bit 8
  1293.        1  Vertical Displayed bit 8
  1294.        2  Vertical Sync Start bit 8
  1295.        3  Vertical Blank Start bit 8
  1296.        4  Line Compare bit 8
  1297.        5  Vertical Total bit 9
  1298.        6  Vertical Displayed bit 9
  1299.        7  Vertical Sync Start bit 9
  1300.  
  1301. 3d4h index 08h (R/W):  STN Color Panel Data Format (CX08)
  1302. bit    0  If set 8bit data, if clear 16bit
  1303.        1  Set for Dual shift clk STN, clear for single
  1304.        2  Set for testing purposes only
  1305.        3  Set to Shorten LP width, clear to Lengthen LP width
  1306.        4  Set to enable foreground text enhancement
  1307.        5  Set for Single Scan Mono Panels, clear for Dual Scan
  1308.        6  Set for testing purposes only
  1309.        7  Set to boost contrast for Mono Panels
  1310.  
  1311. 3d4h index 09h (R/W):  TFT Panel Data Format (CX09)
  1312. bit  0-1  Data format. 0: 9bit(333), 2: 12bit(444), 1,3: 18bit direct
  1313.      2-4  Shiftclock delay from internal character clock to TFT hsync(LLCLK)
  1314.           signal
  1315.  
  1316. 3d4h index 0Ah (R/W):  TFT Panel HSYNC Position Control (CX0A)
  1317. bit  0-7  Horizontal counter to generate TFT panel VSYNC signal.
  1318.           Set in multiples of 8 VCLKs (80 column character clocks)
  1319.  
  1320. 3d4h index 0Bh (R/W):  Panel Adjustment Control (CX0B)             (6235 only)
  1321. bit  0-4  Number of LLCLKs between upper and lower panel halfs
  1322.      5-6  Offset adjustment for gray-scale shading
  1323.  
  1324. 3d4h index 10h (R/W):  Vertical Sync Start (RX10)
  1325. bit  0-7  VSYNC Start
  1326.  
  1327. 3d4h index 11h (R/W):  Vertical Sync End (RX11)
  1328. bit  0-3  VSYNC End.
  1329.        4  Clear Vertical Sync Interrupt
  1330.        5  Enable Vertical Sync Interrupt
  1331.        6  Select 5 refresh cycles
  1332.        7  Write protect index 0-7.
  1333.  
  1334. 3d4h index 15h (R/W):  Vertical Blank Start (RX15)
  1335. bit  0-7  Vertical Blank Start
  1336.  
  1337. 3d4h index 16h (R/W):  Vertical Blank End
  1338. bit  0-7  Vertical Blank End
  1339.  
  1340. 3d4h index 19h (R/W):  Interlace End
  1341. bit  0-7  Ending Horizontal Character Count for Odd field VSYNC.
  1342.           Typically half the horizontal total
  1343.  
  1344. 3d4h index 1Ah (R/W):  Miscellaneous Control
  1345. bit    0  Enable Interlace sync/video data in Graphics mode or interlace only
  1346.           in Text mode. Set if an interlaced mode.
  1347.        1  Enable Double-Buffered Display Start Address
  1348.  
  1349. 3d4h index 1Bh (R/W):  Extended Display Control
  1350. bit    0  Display Start Address bit 16. Bit 0-15 are in 3d4h index Ch-Dh.
  1351.        1  Enable Extended Address Wrap. Set to enable access to video memory
  1352.           beyond 128K (16bit memory) or 256K (32bit memory)
  1353.        5  Set RAMDAC blanking=display enable signal (no border)
  1354.        6  Select Text mode Fast-Page (132 color text)
  1355.        7  Disable Cursor blink in Text Mode
  1356.  
  1357. 3d4h index 1Ch (R/W):  Flat-Panel Interface
  1358. bit    0  Invert LFS signal
  1359.        1  Invert LLCLK signal
  1360.        2  Enable MCLK power-down during suspend mode
  1361.        3  Protect CRTC for LCD timing:
  1362.             3d4h index 0,1,6,7(bits 0,2,5,7), 10h and 11h
  1363.        5  Enable extra LLCLK. Used for adjusting 242 line dual panel
  1364.      6-7  Flat-Panel type. 0: Dual Mono, 1: Plasma/EL, 2: STN color,
  1365.            3: TFT color
  1366.  
  1367. 3d4h index 1Dh (R/W):  Flat Panel Display Control
  1368. bit    0  Enable Auto Center
  1369.        1  Enable Auto Expand:  3C2h bit 6-7: 1: 400/200 lines, 2: 350, 3: 480.
  1370.        2  Enable VGA access to reset Backlight Timer
  1371.        3  Enable input ACTi to reset Backlight Timer
  1372.        4  Suspend mode Clock source. If set use OSC, if clear use pin 32KHz.
  1373.        5  Enable VGA access to reset Standby Timer
  1374.        6  Enable input ACTi to reset Standby Timer
  1375.        7  Enable access to LCD timing register at CRTC alternate index if set
  1376.  
  1377. 3d4h index 1Eh (R/W):  Flat Panel Shading
  1378. bit    0  Enable Planar Graphics Mode Dithering
  1379.        1  Enable Text mode Contrast Enhancement
  1380.      2-3  # of shades for Flat Pane:
  1381.           Mono:   0: 16, 1: 64, 2: 128, 3:256
  1382.           Color:  0: 4K, 1-3: 256K
  1383.        4  Reverse Video Graphics Modes
  1384.        5  Reverse Video Text Modes
  1385.      6-7  Shade Mapping.
  1386.            0: 18bit LUT output to 64 shades with NTSC weighting
  1387.            1: green LUT output (6 bit to 64 shades).
  1388.            2: Display data before Attribute Controller to 64 shades
  1389.            3: Attribute Controller output, 6bitrs to 64 shades
  1390.  
  1391. 3d4h index 1Fh (R/W):  Flat Panel MOD control
  1392. bit  0-6  If bit 7 is set LLCLK = (this value) + 180h
  1393.           if clear this is the number of scan lines after which the MOD pin
  1394.           will change polarity.
  1395.        7  Modulation select. Set for internal Modulation, clear for external
  1396.  
  1397. 3d4h index 20h (R/W):  Power Management
  1398. bit    0  Text Mode Shading Control. If set the text shades are derived the
  1399.           same way as the graphics, if clear the text shades are derived
  1400.           directly from the FG/BG data.
  1401.      1-2  Select Refresh Rate. 0: 8ms, 2: 64ms, 2: self refresh, 3: no refresh
  1402.        3  Activate Suspend Mode (timer override)
  1403.        4  Activate Standby Mode (timer override)
  1404.        5  Enable LCD mode if set
  1405.        6  Enable CRT mode if set
  1406.        7  set pin STANDBY to 'activate' output
  1407.  
  1408. 3d4h index 21h (R/W):  Power Down Timer Control
  1409. bit  0-3  Standby Mode Timer Control. 0: disable timer, 1-15: minutes
  1410.      4-7  Backlight Timer Control (FPBack)
  1411.  
  1412. 3d4h index 23h (R/W):  Suspend Mode Input Switch Debounce Timer
  1413. bit    0  FPVcc output state (if bit1 set)
  1414.        1  FPVcc control override
  1415.        2  FPBack output state (if bit3 set)
  1416.        3  FPBack control override
  1417.      4-7  Time for input SUSPEND to remain active before entering suspend
  1418.           mode. 0: disable timer checking, 1-15: seconds
  1419.  
  1420. 3d4h index 25h (R/W):  Part Status Register
  1421. bit  0-7  Part Status. Used for factory testing only.
  1422.  
  1423. 3d4h index 27h (R):  Part ID register
  1424. bit  0-1  Revision Level
  1425.        3  Set to 1 ???
  1426.      6-7  Device Identifier.
  1427.             0: CL-GD6205    (C9h  rev -BL)
  1428.             1: CL-GD6235    (89h  rev -BK)
  1429.             2: CL-GD6215    (48h)
  1430.             3: CL-GD6225    (09h  rev -BK)
  1431.  
  1432. 3d4h index 29h (R/W):  Configuration Read Back
  1433. bit    0  Bus Type Select. 0: Local Bus, 1: ISA bus
  1434.      1-2  Local Bus Type
  1435.        3  DRAM Type Select. 0: Dual CAS DRAM, 1: Dual write enable DRAM
  1436.        4  Active NPD (no power down) input
  1437.        5  Power up/down cycling activity
  1438.  
  1439.  
  1440.  
  1441. GD5402, 542x and 543x series:
  1442. Also CL-GD754x Nordic/Viking LCD controllers
  1443.  
  1444. 94h (W):  102 Access Control Register
  1445. bit    5  POS 102 Access. If clear register 102h is accessible, if set 102h is
  1446.           not accessible.
  1447. Note: This register only accessible if the chip is configured for 3C3h sleep
  1448.       (CF[3]=0) and for ISA or local bus.
  1449.  
  1450. 102h (R/W):  POS102 Register
  1451. bit    7  Video Subsystem Enable. If set (and bit 4 of 3C3h or 46E8h is also
  1452.           set) the chip is enabled, if clear the chip is disabled and only
  1453.           responds to accesses to this register (5420 and 5422), the 5424-29
  1454.           also responds to accesses to 3C3h.
  1455. Note: For MicroChannel systems this register is only accessible when the
  1456.       -CD_SETUP pin is low, for other systems it is accessible if bit 4 of
  1457.       3C3h/46E8h is set.
  1458.  
  1459. 3C3h (R/W):  MicroChannel Sleep Address Register                     (5424-29)
  1460. bit    7  Video Subsystem Enable. If set the chip is enable, if clear the chip
  1461.           is disabled and only responds to accesses to this register
  1462. Note: This register only available in MicroChannel systems.
  1463.  
  1464. 3C3h (R/W):  Motherboard Sleep Address Register                      (5424-29)
  1465. bit    3  Video Subsystem Enable. If set the chip is enabled, if clear the
  1466.           chip is disabled and only responds to this register, 102h and the
  1467.           BIOS, all other registers and the video memory will not respond.
  1468.        4  Setup. If set the chip is in setup mode and only this register and
  1469.           102h can be accessed, other registers and display memory does not
  1470.           respond, if this bit clear the chip is in normal mode.
  1471. Note: This is the same registers as 46E8h. The register is mapped at 3C3h,
  1472.       46E8h or disabled depending on bus and chiptype. The 5420 and 5422
  1473.       always maps it at 46E8h. The 5424-29 maps it at 3C3h (Motherboard
  1474.       systems CF[3]=0) or 46E8h (CF[3]=1) depending on bit 3 of the
  1475.       Configuration Register, which is sampled at power-on from MD[16-31].
  1476.       MicroChannel systems disables this register
  1477.  
  1478. 3C4h index  2  (R/W):  Map Mask
  1479. bit  0-7  Enable writing pixel bits 0-7 in Extended Write mode 4 and 5, and in
  1480.           write mode 1 if BY8 addressing is enabled (3CEh index 0Bh bit 1
  1481.           set), otherwise use only bits 0-3 as normal VGA.
  1482. Note: See the VGA section for the normal use of this register
  1483.  
  1484. 3C4h index  4  (R/W):  Memory Mode Register
  1485. bit    0  Reserved, indicates text/graphics mode in standard VGA
  1486. Note: See the VGA section for the normal use of this register
  1487.  
  1488. 3C4h index  6  (R/W):  Unlock ALL Extensions                        (not 5429)
  1489. bit  0-2,4  Writing 12h to this register enables extensions.
  1490.             Read back 0Fh if locked.
  1491.             Bits 3,5-7 are ignored on write.
  1492. Note: on the 5429 the extensions are always enabled.
  1493.  
  1494. 3C4h index  7  (R/W):  Extended Sequencer Mode
  1495. bit    0  Enable High-Resolution 256 Color modes if set.
  1496.           For the 5429 this disables the Set/Reset logic (3CEh index 0 and 1)
  1497.      1-2  (542x,02)  or
  1498.      1-3  (543x) Select CRTC Character Clock Divider.
  1499.              0: Normal operation
  1500.              1: Clock/2 for 16bit pixels. In this mode the video clock is
  1501.                 programmed for twice the number of pixels (= the number of
  1502.                 bytes) and the horizontal timing in units of 8 pixels as in
  1503.                 standard VGA modes.
  1504.              2: Clock/3 for 24bit pixels. In this mode the video clock is
  1505.                 programmed for 3 times the number of pixels (= the number of
  1506.                 bytes) and the horizontal timing in units of 8 pixels as in
  1507.                 standard VGA modes.
  1508.              3: (5426-3x only) 16bit pixel data at Pixel Rate. In this mode
  1509.                 the video clock is programmed for the number of pixels (= the
  1510.                 number of bytes) and the horizontal timing in units of 8
  1511.                 pixels as in standard VGA modes.
  1512.              4: (543x only) 32bit pixel data at Pixel Rate. In this mode the
  1513.                 video clock is programmed for the number of pixels (= the
  1514.                 number of bytes) and the horizontal timing in units of 8
  1515.                 pixels as in standard VGA modes. This works as a 4bytes per
  1516.                 pixel mode, with the 4th byte being ignored.
  1517.      4-7  (5422-3x) Select 1M Video Memory Mapping.
  1518.             The address in 1MB units the Video Memory is mapped at (0=no
  1519.             mapping). On the 5426-3x if 3CEh index 0Bh is set bit 4 is ignored
  1520.             and the 2MB buffer is mapped at an even MB block.
  1521.             When in planar modes or using x8 or x16 addressing (3CEh index 0Bh
  1522.             bit 1 set) or if less than the max amount of memory is installed
  1523.             the memory block will wrap so that there are 2,4,8... instances
  1524.  
  1525. 3C4h index  8  (R/W):  EEPROM Control
  1526. bit    0  "CS" out to EEPROM. Sets the EECS pin to this value
  1527.        1  Enable EEPROM data input (bit 7) if set
  1528.        2  "SK" to EEPROM thru ESYNC. If bit 4 is set, the ESYNC pin is set to
  1529.           this value.
  1530.        3  "DI" to EEPROM thru EVIDEO. If bit 4 is set, the EVIDEO pin is set
  1531.           to this value.
  1532.        4  Enable EEPROM Data and Sk. If set ESYNC and EVIDEO* are outputs,
  1533.           if clear inputs
  1534.        5  Latch ESYNC/EVIDEO*. If clear ESYNC and EVIDEO* control the HSYNC,
  1535.           VSYNC, BLANK* and P[0-7] drivers, if set ESYNC and EVIDEO* are
  1536.           latched internally, and the latched values control the HSYNC, VSYNC,
  1537.           BLANK* and P[0-7] drivers, which frees the ESYNC and EVIDEO* pins
  1538.           for EEPROM operations. This bit should be set prior to setting bit 4
  1539.           and cleared after clearing bit 4
  1540.        6  Disable MEMCS16* for display memory. If set video memory accesses
  1541.           will not assert the MCS16* signal. This only works for ISA bus
  1542.           systems, for all other configurations (and when using BITBLTs to or
  1543.           from system memory) this bit must be set to 0.
  1544.        7  (R) EEPROM Input Data. If bit 1 is set this reflects the EEDI pin.
  1545.  
  1546. 3C4h index  9  (R/W):  Scratch Register 0
  1547. bit  0-3  (754x) Video memory. 0: 256K, 1: 512K, 2: 1MB, 3: 2MB, 4: 4MB
  1548.      2-4  (54xx) Monitor type.
  1549.            0:  31,5kHz           Std VGA. IBM 8512,8503
  1550.            1:  31.5, 35.5 kHz    IBM 8514
  1551.            2:  31.5, 35.1 kHz    NEC 2A
  1552.            3:  31.5 - 35.5 kHz   NEC II
  1553.            4:  31.5 - 38 kHz     Multi Freq. NEC 3D
  1554.            5:  31.5 - 48 kHz     Sony CPD-1304, NEC 3FG, Nanao 9065S, 9070U
  1555.            6:  31.5 - 56.5 kHz   NEC 4D,4FG, Nanao T240i
  1556.            7:  31.5 - 64 kHz     NEC 5D,5FG/6FG, Nanao T560i,T660i
  1557. Note: This register is set by the BIOS and may differ in some versions.
  1558.  
  1559. 3C4h index 0Ah (R/W):  Scratch Register 1
  1560. bit  0-1  (5402) Display Memory. 0: 256K, 1: 512K, 2: 1M
  1561.        0  (542x)
  1562.      3-4  (542x) Video memory. 0=256K, 1=512K, 2=1024K, 3=2048K
  1563. Note: Video memory should be determined from this register rather than
  1564.       index 0Fh
  1565. Note: This register is set by the BIOS and may differ in some versions.
  1566.  
  1567. 3C4h index 0Bh (R/W):  VCLK 0 Numerator Register
  1568. bit  0-6  VCLK 0 Numerator bits 0-6
  1569. Note: See index 1Bh for the frequency calculation
  1570.  
  1571. 3C4h index 0Ch (R/W):  VCLK 1 Numerator Register
  1572. bit  0-6  VCLK 1 Numerator bits 0-6
  1573. Note: See index 1Bh for the frequency calculation
  1574.  
  1575. 3C4h index 0Dh (R/W):  VCLK 2 Numerator Register
  1576. bit  0-6  VCLK 2 Numerator bits 0-6
  1577. Note: See index 1Bh for the frequency calculation
  1578.  
  1579. 3C4h index 0Eh (R/W):  VCLK 3 Numerator Register
  1580. bit  0-6  VCLK 3 Numerator bits 0-6
  1581. Note: See index 1Bh for the frequency calculation
  1582.  
  1583. 3C4h index 0Fh (R/W):  DRAM Control Register
  1584. bit  0-1  (542x) (R) MCLK Select: 0: 50.11363 MHz, 1: 44.74431 MHz,
  1585.               2: 41.16477 MHz, 3: 37.58523 MHz
  1586.        0  (543x) (R) Disable DAC
  1587.        1  (543x) MCLK Timing. 0: 50.11363MHz, 1: 41.16477MHz
  1588.        2  RAS* Timing.
  1589.               0: Extended (RAS* high for 3MCLK, low for 4)
  1590.               1: Standard (RAS* high for 2.5MCLK, low for 3.5)
  1591.      3-4  (54xx) DRAM Data Bus Width.
  1592.              (542x) 0: 8bit (256K), 1: 16bit (512K), 2: 32bit (1M/2M)
  1593.              (543x) 2: 32bit, 3:64 bit
  1594.        5  (5422-3x) CRT FIFO Depth Control. If clear the CRT FIFO is 8 pixels
  1595.             deep, if set it is 16 (20 for 5429) levels deep.
  1596.             Typically clear for standard VGA and 16color modes and set for
  1597.             extended 256color modes and Hi/Truecolor modes
  1598.        6  (542x) Disable CRTC FIFO Fast-Page Mode. If set writes to display
  1599.            memory will happen as random writes, if clear as Fast-page writes
  1600.            if possible. Should be set when loading font data and for multiple
  1601.            color-expansion writes in 16bit pixel modes (5422 & 5424 only).
  1602.           (543x) CPU Write Buffer Control
  1603.        7  (5426-28) DRAM Bank Select. 0: 4 512Kx8, 1: 4 256Kx16 or 16 256Kx4
  1604.                     Set to enable access to memory beyond 1MB ??
  1605.           (543x)  DRAM Bank Switch Control. If set there are two RAM banks
  1606.  
  1607. 3C4h index 10h (R/W):  Graphics Cursor X Position Register
  1608. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1609.           index register are taken as the low order bits of an 11 bit
  1610.           register. This is the horizontal position of the hardware cursor in
  1611.           pixels.
  1612.  
  1613. 3C4h index 11h (R/W):  Graphics Cursor Y Position Register
  1614. bit  0-7  When this value is written to the register, the upper 3 bits of the
  1615.           index register are taken as the low order bits of an 11 bit
  1616.           register. This is the vertical position of the hardware cursor in
  1617.           pixels.
  1618.  
  1619. 3C4h index 12h (R/W):  Graphics Cursor Attribute Register
  1620. bit    0  Enable the hardware cursor if set
  1621.        1  Enable Access to RAMDAC Extended Colors registers.
  1622.           When set the DAC registers 3C7h/3C8h and 3C9h accesses a
  1623.           separate palette with 16 entries, if clear the normal 256 entry
  1624.           palette is accessed. Special palette entry 0 is the cursor
  1625.           background color and entry Fh is the cursor foreground color.
  1626.           Entry 2 is the overscan color (See bit 7).
  1627.        2  (5422-3x) If set select 64x64 cursor, if clear 32x32.
  1628.        7  (5424-3x) Overscan Color Protect. If set the screen border is
  1629.             displayed using the special palette entry 2 (accessed with bit 1
  1630.             set), if clear using the normal border color (3C0h index 11h).
  1631.  
  1632. 3C4h index 13h (R/W):  Graphics Cursor Pattern Address Offset Register
  1633. bit  0-5  Select 1 of 64 32x32 cursors
  1634.      2-5  (5422-3x) Select 1 of 16 64x64 cursors (if index 12h bit 2 is set)
  1635.           The offset in 256 byte units within the last 16KB of video memory
  1636.           where the cursor mask and shape bitmaps are stored.
  1637.           There are two 128 byte (32x32 bits) bitmaps stored in video memory.
  1638.           The appearance of the cursor at each pixel is determined by a
  1639.           combination of the corresponding pixels from the first and second
  1640.           bitmap:
  1641.             1st: 2nd:
  1642.              0    0     The original screen pixel is shown (invisible cursor)
  1643.              0    1     The pixel is shown in the cursor background color.
  1644.              1    0     The pixel is shown as the inverse of the original
  1645.                         screen pixel (XOR cursor)
  1646.              1    1     The pixel is shown in the cursor foreground color.
  1647.  
  1648. 3C4h index 14h (R/W):  Scratch-Pad Register 2                    (5426 + only)
  1649. bit  0-7
  1650.  
  1651. 3C4h index 15h (R/W):  Scratch-Pad Register 3                    (5426 + only)
  1652. bit  0-7  ??
  1653.      0-3  (543x) Video memory. 0: 256K, 1: 512K, 2: 1MB, 3: 2MB, 4: 4MB
  1654.  
  1655. 3C4h index 16h (R/W):  Performance Tuning Register               (5424 + only)
  1656. bit  0-3  FIFO Demand Threshold. Selects the level where the Sequencer begins
  1657.           to refill the CRT FIFO (and thus hold off CPU cycles or pre-empt
  1658.           fast page mode bitblt cycles).
  1659.      4-5  (5424-28) RDY# delay for memory write. Defines the number of CPU
  1660.             clock cycles from ADS# to RDY# for memory write cycles.
  1661.             (5424-28) 0: 1, 1: 2 ,2: 3, 3: 4   (5429) 0: 2, 1: 3, 2: 4, 3: 5
  1662.             Only used for local bus systems. Also the following must be true:
  1663.              Number * (CPU clock period) > 3*MCLK period +2ns.
  1664.        4  (543x)  LRDY# Delay for Memory Cycles
  1665.        5  (543x)  Readback of CF6
  1666.      6-7  (5424-28) RDY# delay for I/O. Defines the number of CPU clock cycles
  1667.             from ADS# to RDY# for I/O cycles: 0,1: 1  2,3: 2.
  1668.             Only used for local bus systems.
  1669.           (543x)  LRDY# Delay for I/O Cycles
  1670.  
  1671. 3C4h index 17h (R/W):  Configuration Readback and Extended Control    (5422 +)
  1672. bit    0  Shadow DAC Writes on Local Bus. If set writes to registers 3C6h-3C9h
  1673.           will be passed to external circuitry, if clear they will be handled
  1674.           internally.
  1675.        1  (5429) Power Down Palette Memory. If set the palette RAM for the
  1676.            palette lookup table is not clocked, reducing power consumption.
  1677.            If clear the palette RAM functions normally.
  1678.        2  (5429 +) Enable Memory-Mapped I/O. If set the BitBLT registers can
  1679.            be accessed via either memory operations or I/O operations, if
  1680.            clear only via I/O operations. 3CEh index 6 bits 2-3 must be set
  1681.            to 1. Bit 6 selects where the 256bytes of Memory Mapped registers
  1682.            are located in system address space.
  1683.           Offset:  3CEh index:    Description:
  1684.             00h       00h         Background Color low byte
  1685.             01h       10h         Background Color high byte
  1686.             02h       12h         (543x +) Background Color byte 2
  1687.             03h       14h         (543x +) Background Color byte 3
  1688.             04h       01h         Foreground Color low byte
  1689.             05h       11h         Foreground Color high byte
  1690.             06h       13h         (543x +) Foreground Color byte 2
  1691.             07h       15h         (543x +) Foreground Color byte 3
  1692.           08h-09h   20h-21h       BLT Width
  1693.           0Ah-0Bh   22h-23h       BLT Height
  1694.           0Ch-0Dh   24h-25h       BLT Destination Pitch
  1695.           0Eh-0Fh   26h-27h       BLT Source Pitch
  1696.           10h-12h   28h-2Ah       BLT Destination Address
  1697.           14h-16h   2Ch-2Eh       BLT Source Address
  1698.             17h       2Fh         BLT Destination Write Mask
  1699.             18h       30h         BLT Mode
  1700.             1Ah       32h         BLT Raster Op
  1701.           24h-25h   40h-41h       (545x) Linedraw Start X
  1702.           26h-27h   42h-43h       (545x) Linedraw Start Y
  1703.           28h-29h   44h-45h       (545x) Linedraw End X
  1704.           2Ah-2Bh   46h-47h       (545x) Linedraw End Y
  1705.             2Ch       50h         (545x) Linedraw Line Style Increment
  1706.             2Dh       51h         (545x) Linedraw Line Style Rollover
  1707.             2Eh       52h         (545x) Linedraw Line Style Mask
  1708.             2Fh       53h         (545x) Linedraw Line Style Accumulator
  1709.           30h-31h   54h-55h       (545x) Bresenham K1
  1710.           32h-33h   56h-57h       (545x) Bresenham K3
  1711.           34h-35h   58h-59h       (545x) Bresenham Error
  1712.           36h-37h   5Ah-5Bh       (545x) Bresenham Delta Major
  1713.             38h       5Ch         (545x) Bresenham Direction
  1714.             39h       5Dh         (545x) Linedraw Mode
  1715.             40h       31h         BLT Start/Status
  1716.           The BLT Start/Status register (Offset 40h/3CEh index 31h) is the
  1717.           only read/write memory mapped register, all others are write only.
  1718.      3-5  (R) System Bus Select. Configuration bits CF14,7 and 5. Latched from
  1719.            MD[50:48] on power-up. Identifies the system bus type:
  1720.               1:  386DX local bus
  1721.               2:  386SX local bus
  1722.               4:  VESA VL-bus (> 33MHz)
  1723.               5:  VESA VL-bus (<= 33MHz)
  1724.               6:  MicroChannel bus
  1725.               7:  ISA bus
  1726.        6  (5429) If set (and linear memory is enabled) the memory mapped
  1727.            registers enabled by bit 2 are in the last 256 bytes of the 2MB
  1728.            linear memory block, if clear at B800h:0.
  1729.        7  (?) Disable DRAM Refresh ?
  1730.  
  1731. 3C4h index 18h (R/W):  Signature Generator Control Register           (5422 +)
  1732. bit    0  Enable/Status Signal Generator. If set the Signature Generator will
  1733.           start on the next VSYNC, and will generate a signature from the
  1734.           pixel bit selected by bits 2-4 for one frame and then stop forcing
  1735.           this bit to 0.
  1736.        1  Reset Signature Generator. Set to reset to an initial, defined
  1737.           condition. Clear to allow the Signal Generator to run.
  1738.      2-4  Select Pixel Bus. The bit to input to the Signal Generator.
  1739.            0: bit 0 (P0)  ... 7: bit 7 (P7)
  1740.        5  (5428 +) Enable Data Generator. If set pseudo-random data will be
  1741.            placed on the memory data bus.  ** For testing only **
  1742.        6  (5424 +) Disable DCLK/Pixel Bus Drivers. If set the dotclock and
  1743.            pixel bus drivers are disabled.  ** For testing only **
  1744.        7  (5424 +) Disable MCLK Driver. If set the memory clock is stopped.
  1745.                      ** For Testing only **
  1746.  
  1747. 3C4h index 19h W(R/W):  Signature Generator Result Register           (5422 +)
  1748. bit 0-15  Signal Generator Result
  1749.  
  1750. 3C4h index 1Bh (R/W):  VCLK 0 Denominator & Post
  1751. bit    0  VCLK 0 Post Scalar bit. Divide clock by 2 if set
  1752.      1-5  VCLK 0 Denominator Data
  1753. Note: The clock is (14.31818MHz * numerator (index 0Bh))/Denominator.
  1754.       Divide by 2 if the Post Scalar bit is set.
  1755.       3C2h bits 2-3 selects between VCLK0, 1, 2 and 3
  1756.       Max frequency supported:
  1757.          42MHz:    5401
  1758.          65MHz:    5402 and 5420 (original versions)
  1759.          75MHz     5402 rev 1 and 5420 rev 1 (and probably later revs)
  1760.          80MHz     5422-5428
  1761.          86MHz:    5429
  1762.       Programming a higher clock frequency may work, give an unstable image
  1763.       or fail totally.
  1764.  
  1765. 3C4h index 1Ch (R/W):  VCLK 1 Denominator & Post
  1766. bit    0  VCLK 1 Post Scalar bit. Divide clock by 2 if set
  1767.      1-5  VCLK 1 Denominator Data
  1768. Note: See index 1Bh for the frequency calculation
  1769.  
  1770. 3C4h index 1Dh (R/W):  VCLK 2 Denominator & Post
  1771. bit    0  VCLK 2 Post Scalar bit. Divide clock by 2 if set
  1772.      1-5  VCLK 2 Denominator Data
  1773. Note: See index 1Bh for the frequency calculation
  1774.  
  1775. 3C4h index 1Eh (R/W):  VCLK 3 Denominator & Post
  1776. bit    0  VCLK 3 Post Scalar bit. Divide clock by 2 if set
  1777.      1-5  VCLK 3 Denominator Data
  1778. Note: See index 1Bh for the frequency calculation
  1779.  
  1780. 3C4h index 1Fh (R/W):  BIOS Write Enable and MCLK select        (5424-5x only)
  1781. bit  0-5  MCLK frequency bit 0-5. The MCLK frequency is: (RefClk/8)*value,
  1782.           where the reference clock (RefClk) is the same as used for VCLK
  1783.           generation, typically 14.318MHz
  1784.           The 5424-5428 handles MCLKs up to 50MHz, the 5429 up to 60MHz
  1785.        6  (5428-3x) Use MCLK as VCLK. If clear the video clock (VCLK) is
  1786.            derived as described under index 1Bh, if set it is derived from
  1787.            MCLK as follows: If index 1Eh bit 0 is set VCLK = MCLK/2, if it is
  1788.            clear VCLK = MCLK
  1789.        7  Enable BIOS write. If set writes to C000h:0-C7FFh:Fh will activate
  1790.           the EROM* signal enabling FLASH ROM writing
  1791.  
  1792. 3C6h (R/W):  Hidden DAC Register
  1793. bit  0-3  Extended Mode Select. If bit 6 and 7 are both set this field
  1794.           selects the DAC mode:
  1795.               0:  5-5-5 15bit Sierra HiColor
  1796.               1:  5-6-5 16bit "XGA" HiColor
  1797.               5:  (5422+) 8-8-8 24bit TrueColor. This mode also exists on the
  1798.                     5420 rev1, but is not documented.
  1799.             6/7:  (5428+) DAC Power-down
  1800.               8:  (5428+) 8bit Greyscale.
  1801.               9:  (5428+) 3-3-2 8bit RGB
  1802.        4  32K Color Control. If set bit 15 (MSB) of a 15bit pixel selects
  1803.           whether the pixel is HiColor(bit 15 = 0) or palette data(bit 15 = 1,
  1804.           bit 0-7 is the palette index). This bit only has effect in 5-5-5
  1805.           15bit modes.
  1806.        5  Clocking Mode. If set Clocking Mode 2 will be selected and data will
  1807.           only be latched on the rising edge of DCLK, if clear Clocking Mode 1
  1808.           will be selected and data will be latched on both the rising edge
  1809.           (low byte) and falling edge (high byte) of DCLK. This bit only has
  1810.           effect in 15/16 bit modes as all other modes will use Clocking Mode
  1811.           2. Clocking Mode 1 should only be used for externally supplied DCLK
  1812.           and pixel data.
  1813.        6  Enable ALL Extended Modes. If bit 7 is set and this bit is clear the
  1814.           DAC is in 5-5-5 15bit Sierra HiColor mode, if both bit 7 and this
  1815.           bit are set bits 0-3 determines the DAC mode.
  1816.        7  Enable 5-5-5 Mode. If set the DAC is in an advanced mode, depending
  1817.           on the other bits in this register, if clear the DAC is in VGA
  1818.           compatible palette mode.
  1819. Note: This register is accessed by reading 3C6h four times to unlock this
  1820.       register, then the next read or write of 3C6h will access this register.
  1821.       After reading or writing this register the register is locked and this
  1822.       register can only be accessed be redoing the 4 reads of 3C6h etc. Any
  1823.       access to 3C7h-3C9h will also lock this register. The 5428 is the
  1824.       exception where reads of this register will NOT lock it.
  1825. Note: This register does not exist on the 5401/5402 and the 5420 rev A.
  1826.  
  1827. 3CEh index  0  (R/W):  Set/Reset Register
  1828. bit  0-3  Set/Reset plane bits 0-3, except in Extended Write mode 5:
  1829.      0-7  Background color bits in Extended Write mode 5.
  1830. Note: See the VGA section for the use of this register in write mode 0-3
  1831.  
  1832. 3CEh index  1  (R/W):  Enable Set/Reset Register
  1833. bit  0-3  Enable SR plane 0-3, except in Extended Write mode 4/5:
  1834.      0-7  Foreground color bits in Extended Write mode 4 and 5.
  1835. Note: See the VGA section for the use of this register in write mode 0-3
  1836.  
  1837. 3CEh index  5  (R/W):  Mode
  1838. bit  0-1  (index 0Bh bit 2 clear) Write mode bits 0-1
  1839.      0-2  (index 0Bh bit 2 set) Write mode bit 0-2
  1840.            See the VGA section for modes 0-3.
  1841.            mode 4:  Foreground write. Writes to 8 256color pixels. Each
  1842.                     bit of the CPU data controls writing to one pixel.
  1843.                     Each 1 bit in the CPU data causes the color in 3CEh index
  1844.                     to be written to the corresponding pixel. 0 bits cause the
  1845.                     pixel to be left unchanged. Used to blit patterns with
  1846.                     transparent background.
  1847.                     For the 5422-3x this can be used in 16bit modes if 3CEh
  1848.                     index 0Bh bit 4 is set. 3CEh index 10h has the upper 8bits
  1849.                     of the foreground color
  1850.            mode 5:  Fore and background write. As mode 4, but 0 bits of the
  1851.                     CPU data cause the color in 3CEh index 0 to be written to
  1852.                     the corresponding pixels.
  1853.        3  Enable Read Color Compare
  1854.        4  Enable odd/even (3C4h index 4 bit 2).
  1855.        5  Shift 2 bits per byte (CGA compatibility)
  1856.        6  256 Color Mode if set. Overrides bit 5.
  1857. Note: This is a change from the original VGA
  1858.  
  1859. 3CEh index 09h (R/W):  Offset Register 0
  1860. bit  0-7  4K Primary/Low bank number.
  1861.           If 3CEh index 0Bh bit 0 is set references to A000h-A7FFh use this
  1862.           bank register. If clear references to A000h-AFFFh use this bank
  1863.           register. (5426-3x) If index 0Bh bit 5 is set this register is in
  1864.           units of 16KB, rather than 4KB
  1865.  
  1866. 3CEh index 0Ah (R/W):  Offset Register 1
  1867. bit  0-7  4K High bank number.
  1868.           If 3CEh index 0Bh bit 0 is set references to A800h-AFFFh use this
  1869.           bank register. (5426-3x) If index 0Bh bit 5 is set this register is
  1870.           in units of 16KB, rather than 4KB
  1871.  
  1872. 3CEh index 0Bh (R/W):  Graphics Controller Mode Extensions Register
  1873. bit    0  Enable Offset Register 1. If set references to A000h-A7FFh use 3CEh
  1874.           index 9 as bank register, and references to A800h-AFFFh use 3CEh
  1875.           index 0Ah as bank register. If clear all references to A000h-AFFFh
  1876.           use 3CEh index 9 as bank register.
  1877.           (5422 +) Should be set to 0 if linear addressing (3C4h index 7 bits
  1878.             4-7 not 0) is used.
  1879.        1  Enable BY8 Addressing. If set video memory addresses are shifted 3
  1880.           bits right, so that each CPU byte corresponds to an 8 byte block (in
  1881.           256 color mode). Intended for use with bit 2. If bit 4 is set, it
  1882.           will override this bit.
  1883.        2  Enable Extended Write Modes. If set enables Write Modes 4 and 5 and
  1884.           extends 3C4h index 2 and 3CEh index 0 & 1 from 4 to 8 bits and
  1885.           enables 3CEh index 0Bh bit 4. The extended write modes are intended
  1886.           for 256color modes and allows each CPU byte written to update 8
  1887.           pixels in one operation.
  1888.        3  Enable Eight Byte memory read Data Latch. If set the display memory
  1889.           data latches are 8bits wide, rather than 4bits.
  1890.        4  Enable Enhanced Writes for 16bit pixels. If set (and bit 2 is set)
  1891.           enables the 16bit version of the extended write modes: in 3C4h index
  1892.           2 each bit controls two bytes (= 1 pixel), 3CEh index 10h & 11h are
  1893.           enabled as the upper half of the fore- and background colors (3CEh
  1894.           index 0 and 1) and addresses are shifted 4 bits right.
  1895.        5  (5426-3x) Offset Granularity.
  1896.           If set the bank registers are in 16K rather than 4K units.
  1897.  
  1898. 3CEh index 0Ch (R/W):  Color Key Compare                              (5424 +)
  1899. bit  0-7  Color Key Compare bits 0-7. If Color Key Comparison is enabled (3d4h
  1900.           index 1Ah bit 3 set) the pixel data from video ram is compared to
  1901.           this value, and if they are equal (considering the mask in index
  1902.           0Dh) the pixel from video ram is replaced by the pixel from the
  1903.           Feature Connector.
  1904.  
  1905. 3CEh index 0Dh (R/W):  Color Key Compare Mask                         (5424 +)
  1906. bit  0-7  Color Key Compare Key Mask 0-7. When Color Key Comparison is used
  1907.           this byte selects the bits in the pixel data to compare. A 1 enables
  1908.           the corresponding bit for comparison.
  1909.  
  1910. 3CEh index 0Eh (R/W):  Miscellaneous Control                          (5428 +)
  1911. bit    0  DCLK Output Divide by 2. If set the DAC takes one byte (low) on the
  1912.           rising edge of DCLK and another (high) on the falling edge, this is
  1913.           similar to the Sierra "Mark1" (SC11481/6/8) HiColor mode.
  1914.        1  (5429 +) Static HSYNC. If set DAC is powered down and the HSYNC
  1915.             output will static at the level programmed in 3C2h bit 6.
  1916.        2  (5429 +) Static VSYNC. If set DAC is powered down and the VSYNC
  1917.             output will static at the level programmed in 3C2h bit 7.
  1918.        3  (5429 +) Static Clock. If set the VCLK and MCLK are disabled and the
  1919.             DAC is powered down. DRAM refresh continues.
  1920.  
  1921. 3CEh index 0Fh (R/W:  Display Compression Control                       (543x)
  1922. bit    0  Enable Compression
  1923.        1  Horizontal Compression
  1924.      2-4  Vertical Compression
  1925.  
  1926. 3CEh index 10h (R/W):  16bit Pixel Background Color High Byte         (5422 +)
  1927. bit  0-7  Extended BackGround color bits 8-15 in write mode 5.
  1928.           This data sent to planes 1/3, data from 3CEh index 0 sent to 2/4
  1929.  
  1930. 3CEh index 11h (R/W):  16bit Pixel Foreground Color High Byte         (5422 +)
  1931. bit  0-7  Extended ForeGround color bits 8-15 in write mode 4/5.
  1932.           This data sent to planes 1/3, data from 3CEh index 1 sent to 2/4
  1933.  
  1934. 3CEh index 12h (R/W):  Background Color Byte 2                        (543x +)
  1935. bit  0-7  Extended BackGround color bits 16-23 in write mode 5.
  1936.  
  1937. 3CEh index 13h (R/W):  Foreground Color Byte 2                        (543x +)
  1938. bit  0-7  Extended ForeGround color bits 16-23 in write mode 4/5.
  1939.  
  1940. 3CEh index 14h (R/W):  Background Color Byte 3                        (543x +)
  1941. bit  0-7  Extended BackGround color bits 24-31 in write mode 5.
  1942.  
  1943. 3CEh index 15h (R/W):  Foreground Color Byte 3                        (543x +)
  1944. bit  0-7  Extended ForeGround color bits 24-31 in write mode 4/5.
  1945.  
  1946. 3CEh index 19h (R/W):  CL-GD5453 Mode                              (545x only)
  1947.  
  1948. 3CEh index 20h W(R/W):  BLT Width                                     (5426 +)
  1949. bit 0-10  (5426-28) Number of pixels across in the BLIT area.
  1950.     0-12  (543x)    do
  1951.  
  1952. 3CEh index 22h W(R/W):  BLT Height                                    (5426 +)
  1953. bit  0-9  (5426-28) Number of lines in the BLIT area.
  1954.     0-10  (543x)    do
  1955.  
  1956. 3CEh index 24h W(R/W):  BLT Destination Pitch                         (5426 +)
  1957. bit 0-11  (5426-28) Number of bytes in a scanline at the destination.
  1958.     0-12  (5429 +)  do
  1959.  
  1960. 3CEh index 26h W(R/W):  BLT Source Pitch                              (5426 +)
  1961. bit 0-11  (5426-28) Number of bytes in a scanline at the source.
  1962.     0-12  (5429 +)  do
  1963.  
  1964. 3CEh index 28h 3(R/W):  BLT Destination Start                         (5426 +)
  1965. bit 0-20  (5426-29) Destination address of the BLIT.
  1966.     0-21  (543x)    do
  1967.  
  1968. 3CEh index 2Ch 3(R/W):  BLT Source Start                              (5426 +)
  1969. bit 0-20  (5426-29) Source address of the BLIT.
  1970.     0-21  (543x)    do
  1971.  
  1972. 3CEh index 2Fh (R/W):  Write Mask Destination                         (5429 +)
  1973. bit  0-2  Write Mask. The number of pixels to skip on the left edge of a color
  1974.           expanded BLT operation.
  1975.        7  (543x) Disable X-Y Offset Indexing
  1976.  
  1977. 3CEh index 30h (R/W):  BLT Mode                                       (5426 +)
  1978. bit    0  BLT Direction. Set to decrement addresses during BitBLT operations,
  1979.           clear to increment.
  1980.        1  BLT Destination Display/System Memory. Set if the destination of the
  1981.           BLT is system memory, clear if it is in display memory.
  1982.        2  BLT Source Display/System Memory. Set if the source of the BLT is in
  1983.           system memory, clear if it is in display memory.
  1984.        3  (5426-28) Enable Transparency Compare. If set the result of the ROP
  1985.            is compared with the Transparency Color Register (index 34h/35h).
  1986.            Bit 4 determines if the compare is 8 or 16 bit. If the ROP result
  1987.            matches the register(s) the data is NOT written.
  1988.           (5429) Enable Color Expand with Transparency. If set 0's in the
  1989.            monochrome image being expanded will prevent the pixel from being
  1990.            written. If clear 0's are expanded to the background color.
  1991.            1's are always expanded to the foreground color.
  1992.        4  (5426-29) Color Expand/Transparency Width. If set (and bit 7 set)
  1993.            Color expansion writes 16bit pixels, if clear only 8 bit pixels.
  1994.            Not 5429: If bit 3 set this bit determines the width of the
  1995.            comparison for the Transparency test: Set for 16bit compares, clear
  1996.            for 8bit compares.
  1997.      4-5  (543x) Color Expand/Transparency Width. 0: 8bit, 1: 16bit, 3: 32bit
  1998.        6  Enable 8x8 Pattern Copy. If set the source is an 8x8 pattern which
  1999.           is copied repeatably to the destination. If Color Expansion is
  2000.           enabled (bit 7 set) the source is an 8 byte monochrome 8x8 bitmap
  2001.           aligned on an 8byte boundary, if not it is an 8x8 color bitmap
  2002.           aligned on a 4 byte boundary, using either 64 or 128 bytes
  2003.           depending on the current number of bits per pixel (8 or 16).
  2004.        7  Enable Color Expand. If set the input to the ROP (Raster OPeration)
  2005.           will be the source bitmap after it is color expanded.
  2006.           The destination must be screen memory (bit 1 clear) and the
  2007.           direction increment (bit 0 clear). The Color Registers 3CEh index
  2008.           0,1,10h and 11h are used to expand the source bitmap.
  2009.           The source bitmap starts with the MSB of the first byte. A line in
  2010.           always starts with the MSB of a byte. This may cause extra bits at
  2011.           the end of each line if the pattern width is not a multipla of 8
  2012.           pixels. When the BLT is screen-to-screen the source map must start
  2013.           at a 4byte boundary and will be addressed linearly (source pitch is
  2014.           ignored).
  2015. Note: Either the destination or the source (but not both) of a BLT operation
  2016.       can be in system memory. If so the source data is written to (or the
  2017.       destination data read from) a random address in video memory. The VGA
  2018.       chip will catch these accesses and direct them to the BLT engine.
  2019.       The data read/written must be as DWORDs, i.e. 4 bytes at a time aligned
  2020.       on a 4byte boundary, even if the BLT has less than 4 bytes remaining.
  2021.  
  2022. 3CEh index 31h (R/W):  BLT Start/Status                               (5426 +)
  2023. bit    0  (R) BLT Status.  Set if the BLT engine is busy, clear if it is free
  2024.        1  BLT Start/Suspend. Set to start BLT operation. This bit will clear
  2025.           when the BLT terminates. Clear this bit to suspend the BLT.
  2026.        2  BLT Reset. If set the BLT engine will reset and terminate any
  2027.           operation in progress.
  2028.        3  (R) BLT Progress Status. Set when the BLT starts. Clears when it
  2029.           ends. Remains set if the BLT is suspended (bit 1), but clears if the
  2030.           BLT is reset (bit 2).
  2031.  
  2032. 3CEh index 32h (R/W):  BLT Raster Operation (ROP)                     (5426 +)
  2033. bit  0-7  BLT 2-operand Raster Operation.
  2034.           Code:  Description:                        MS-Windows ROP:
  2035.             00h  0                                   00000042h  BLACKNESS
  2036.             05h  And                                 008800C6h  SRCAND
  2037.             06h  Destination                         00AA0029h
  2038.             09h  Source And Not Destination          00440328h  SRCERASE
  2039.             0Bh  Not Destination                     00550009h  DSTINVERT
  2040.             0Dh  Copy from source                    00CC0020h  SRCCOPY
  2041.             0Eh  1                                   00FF0062h  WHITENESS
  2042.             50h  Not Source And Destination          00220326h
  2043.             59h  Xor                                 00660046h  SRCINVERT
  2044.             6Dh  Or                                  00EE0086h  SRCPAINT
  2045.             90h  Nor                                 001100A6h  NOTSRCERASE
  2046.             95h  XNor                                00990066h
  2047.             ADh  Source Or Not Destination           00DD0228h
  2048.             D0h  Not Source                          00330008h  NOTSRCCOPY
  2049.             D6h  Not Source Or Destination           00BB0226h  MERGEPAINT
  2050.             DAh  NAnd                                007700E6h
  2051.  
  2052. 3CEh index 33h (R/W):  BLT Reserved                              (543x + only)
  2053.  
  2054. 3CEh index 34h W(R/W): BLT Transparent Color                         (5426-28)
  2055. bit 0-15  BLT Transparency Color
  2056.  
  2057. 3CEh index 38h W(R/W): BLT Transparent Mask                          (5426-28)
  2058. bit 0-15  BLT Transparency Color Mask
  2059.  
  2060. 3CEh index 40h W(R/W):  Linedraw Start X                           (545x only)
  2061.  
  2062. 3CEh index 42h W(R/W):  Linedraw Start Y                           (545x only)
  2063.  
  2064. 3CEh index 44h W(R/W):  Linedraw End X                             (545x only)
  2065.  
  2066. 3CEh index 46h W(R/W):  Linedraw End Y                             (545x only)
  2067.  
  2068. 3CEh index 50h (R/W):  Linedraw Line Style Numerator               (545x only)
  2069.  
  2070. 3CEh index 51h (R/W):  Linedraw Line Style Denominator             (545x only)
  2071.  
  2072. 3CEh index 52h (R/W):  Linedraw Line Style Mask                    (545x only)
  2073.  
  2074. 3CEh index 53h (R/W):  Linedraw Line Style Accumulator             (545x only)
  2075.  
  2076. 3CEh index 54h W(R/W):  Linedraw Bresenham K1                      (545x only)
  2077.  
  2078. 3CEh index 56h W(R/W):  Linedraw Bresenham K2                      (545x only)
  2079.  
  2080. 3CEh index 58h W(R/W):  Linedraw Bresenham Error                   (545x only)
  2081.  
  2082. 3CEh index 5Ah W(R/W):  Linedraw Bresenham Delta Major             (545x only)
  2083.  
  2084. 3CEh index 5Ch (R/W):  Linedraw Direction                          (545x only)
  2085.  
  2086. 3CEh index 5Dh (R/W):  Linedraw Modes                              (545x only)
  2087. bit  0-2  Line Style. Index to the bit in the Line Style Mask to use for first
  2088.           pixel drawn.
  2089.        3  Direct Specification Mode. 0: Bresenham, 1: End-point
  2090.        4  Draw End Point if set
  2091.        5  Draw Start Point if set
  2092.  
  2093. 3d4h index 09h (R/W):  R9X                                              (754x)
  2094. bit  2-3  Panel type. 1: 800x600
  2095.  
  2096. 3d4h index 19h (R/W):  Interlace End
  2097. bit  0-7  Ending Horizontal Character Count for Odd field VSYNC.
  2098.           Typically half the horizontal total
  2099.  
  2100. 3d4h index 1Ah (R/W):  Miscellaneous Control
  2101. bit    0  Enable Interlace sync/video data in Graphics mode or interlace only
  2102.           in Text mode. Set if an interlaced mode.
  2103.        1  Enable Double-Buffered Display Start Address. If set changes to the
  2104.           Display Start Address (index 0Ch,0Dh plus extensions) will not take
  2105.           effect until VSYNC occours, thus preventing the need to check VSYNC
  2106.           before updating the DSA.
  2107.      2-3  Overlay/DAC Mode Switching Control
  2108.             0:  Normal Operation
  2109.             1:  with EVIDEO* (or OVWR* for the 5429 only)
  2110.             2:  with EVIDEO* and Color Key (5424-3x only)
  2111.             3:  with Color Key
  2112.      4-5  Horizontal Blank End Overflow bits 6-7. Only enabled if index 1Bh
  2113.           bit 5 (and/or bit 7 for the 5424 +) is set
  2114.      6-7  Vertical Blank End Overflow bits 8-9. Only enabled if index 1Bh bit
  2115.           5 (and/or bit 7 for the 5424 +) is set
  2116.  
  2117. 3d4h index 1Bh (R/W):  Extended Display Control
  2118. bit    0  Display Start Address bit 16. Bits 0-15 are in 3d4h index Ch-Dh.
  2119.           Bits 17, 18 and 19 are in this register and index 1Dh.
  2120.        1  Enable Extended Address Wrap. If clear the CRTC Character Address
  2121.           Counter is 16bit wide, providing VGA compatibility but limiting
  2122.           display memory to 256K. If set the counter is 18 bits wide (19 for
  2123.           the 5426 +) allowing for 1 (or 2) Mbytes of display memory.
  2124.        2  (5420 +) Display Start Address bit 17. Bits 0-15 are in 3d4h index
  2125.            Ch-Dh. Bits 16, 18 and 19 are in this register and index 1Dh.
  2126.        3  (5426 +) Display Start Address bit 18. Bits 0-15 are in 3d4h index
  2127.            Ch-Dh. Bits 16, 17 and 19 are in this register and index 1Dh.
  2128.        4  Bit 8 of the CRTC Offset register (3d4h index 13h).
  2129.        5  Blanking Control. If clear the DAC blanking is controlled by the
  2130.           CRTC blanking signal and the border can be used. If set the DAC
  2131.           blanking is controlled by the Display Enable, thus blanking the
  2132.           border area, the CRTC blanking signal will be output on the OVRW
  2133.           pin. Also the Horizontal and Vertical Blank End bits (bit 4-7) in
  2134.           3d4h index 1A are enabled.
  2135.        6  Select Text mode Fast-Page. If set font data will be fetched using
  2136.           fast Page Mode read cycles allowing text modes with a VCLK greater
  2137.           than 30 MHz. This will not work with VGA double fonts, I.e. the two
  2138.           Character Maps in 3C4h index 3 must be equal. If this bit is clear
  2139.           all font fetches use random reads.
  2140.        7  (5424-3x) Enable Blank End Extensions. If set (or if bit 5 is set)
  2141.           the Horizontal and Vertical Blank End bits (bit 4-7) in 3d4h index
  2142.           1A are enabled.
  2143.  
  2144. 3d4h index 1Ch (R/W):  Sync Adjust and Genlock                        (543x +)
  2145. bit  0-2  Horizontal Sync Start Adjust
  2146.      3-5  Horizontal Total Adjust
  2147.        6  Enable HSYNC GENLOCK
  2148.        7  Enable VSYNC GENLOCK
  2149.  
  2150. 3d4h index 1Dh (R/W):  Overlay Extended Control                       (5429 +)
  2151. bit    0  (543x +) Enable Alpha Overlay
  2152.      1-2  DAC Mode Switching Control. This controls the DAC mode switching,
  2153.           the pixel data is still selected from 3d4h index 1Ah bit 2-3.
  2154.               0: Switch True selects Extended DAC mode
  2155.               1: Switch False selects Extended DAC mode
  2156.             2,3: Extended DAC mode disabled.
  2157.        3  (543x +) Overlay Video Clocking Mode
  2158.      4-5  (543x +) Color Key Compare type
  2159.        6  Overlay Timing Signal Source. If clear the timing signal for Overlay
  2160.           modes 1 and 2 (See 3d4h index 1Ah bits 2-3) comes from the EVIDEO*
  2161.           input. If set from the internal OVRW* signal.
  2162.        7  (543x +) Extended Display Start Address bit 19. Lower bits are in
  2163.             3d4h index 1Bh and 3d4h index 0Ch/0Dh
  2164.  
  2165. 3d4h index 1Eh (R/W):  Timing Overflow                             (545x only)
  2166.  
  2167. 3d4h index 1Fh (R/W):  Overflow                                    (545x only)
  2168.  
  2169. 3d4h index 20h (R/W):                                                   (754x)
  2170. bit    5  Set for LCD panel
  2171.  
  2172. 3d4h index 22h (R):  Graphics Data Latches Readback Register
  2173. bit  0-7  Reading this register returns the current content of the Graphics
  2174.           Controller Data Latch selected by 3CEh index 4 bits 0-1.
  2175.  
  2176. 3d4h index 24h (R):  Attribute Controller Toggle Readback Register
  2177. bit    7  If set the Attribute Controller will next access a data register, if
  2178.           clear it'll access the index register
  2179.  
  2180. 3d4h index 25h (R/W):  Part Status Register                         (not 5402)
  2181. bit  0-7  Part Status. Used for factory testing and internal tracking only.
  2182.           (5429) >=67h for 5429 rev B, which fixes a BLT problem ?
  2183.           (5434) 28h: 5434 rev AH (.6u), B0h: 5434 rev EP (.6u)
  2184.  
  2185. 3d4h index 26h (R):  Attribute Controller Index Readback Register
  2186. bit  0-4  The last value written to bits 0-4 of the index register at 3C0h.
  2187.        5  The last value written to bit 5 of the index register at 3C0h.
  2188.  
  2189. 3d4h index 27h (R):  Part ID register
  2190. bit  0-1  Revision Level
  2191.      2-7  (54xx) Device Identifier:
  2192.                   06h: Acumos AVGA2 & 5402 ??
  2193.                   0Bh: CL-GD7542 (Nordic)
  2194.                   0Ch: CL-GD7543 (Viking) - guess
  2195.                   0Dh: CL-GD7541 (Nordic Lite)
  2196.                   22h: Depends on revision Level:
  2197.                        CL-GD5402        Rev=0  (88h)
  2198.                        CL-GD5402 rev 1  Rev=1  (89h)
  2199.                        CL-GD5420        Rev=2  (8Ah)
  2200.                        CL-GD5420 rev 1  Rev=3  (8Bh)
  2201.                   23h: CL-GD5422           (8Ch-8Fh)
  2202.                   24h: CL-GD5426           (90h-93h)
  2203.                   25h: CL-GD5424           (94h-97h)
  2204.                   26h: CL-GD5428           (98h-9Bh)
  2205.                   27h: CL-GD5429           (9Ch-9Fh)
  2206.                   28h: CL-GD5430           (A0h-A3h)
  2207.                   29h: CL-GD5434 - Originally assigned to 5434, never used ?
  2208.                   2Ah: CL-GD5434           (A8h-ABh)
  2209.                   2Bh: CL-GD5436 ??
  2210. Note: I've seen two chips marked as 5422-80, returning 94h i.e. a 5424.
  2211.  
  2212. 3d4h index 2Ch (R/W):  LCD Interface Register                           (754x)
  2213. bit    3  Clear to access the shadowed Vertical registers at 3d4h index
  2214.            6,7,10h,11h,15h and 16h
  2215.      4-5  Set to 0 (and set 3d4h index 2Dh bit 7) to enable the X shadow
  2216.           registers (R2X-REX: 3d4h index 2-9,Bh-Eh), 2 to enable the Y shadow
  2217.           registers (3d4h index 0,2-5), 3 to enable the Z shadow registers
  2218.            (3d4h index 0,2-5)
  2219.  
  2220. 3d4h index 2Dh (R/W):  LCD Display Control                              (754x)
  2221. bit    7  Set to access the LCD timing registers (R2X-REX) at 3d4h index
  2222.            19h - 30h and 40h - 4Fh  ?
  2223.  
  2224. 46E8h (R/W):  Adapter Sleep Address Register                         (5424-29)
  2225. bit    3  Video Subsystem Enable. If set the chip is enabled, if clear the
  2226.           chip is disabled and only responds to this register, 102h and the
  2227.           BIOS, all other registers and the video memory will not respond.
  2228.        4  Setup. If set the chip is in setup mode and only this register and
  2229.           102h can be accessed, other registers and display memory does not
  2230.           respond, if this bit clear the chip is in normal mode.
  2231. Note: This is the same registers as 3C3h. The register is mapped at 3C3h,
  2232.       46E8h or disabled depending on bus and chiptype. The 5420 and 5422
  2233.       always maps it at 46E8h. The 5424-29 maps it at 3C3h (Motherboard
  2234.       systems CF[3]=0) or 46E8h (CF[3]=1) depending on bit 3 of the
  2235.       Configuration Register, which is sampled at power-on from MD[16-31].
  2236.       MicroChannel systems disables this register
  2237.  
  2238.  
  2239.   Memory locations:
  2240.  
  2241.   $C000:$8  1 byte   Offset of Model string in BIOS.
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.   ID Cirrus VGA:
  2248.  
  2249.  
  2250.   (* First test for Cirrus 54xx *)
  2251.  
  2252.   old:=rdinx($3C4,6);
  2253.   wrinx($3C4,6,0);
  2254.   if rdinx($3C4,6)=$F then
  2255.   begin
  2256.     wrinx($3c4,6,$12);
  2257.     if (rdinx($3C4,6)=$12) and testinx2($3C4,$1E,$3F) then
  2258.     begin
  2259.       SubVers:=rdinx($3d4,$27);
  2260.       if testinx($3CE,9) then
  2261.         case SubVers of
  2262.               $88:name:='Cirrus CL-GD5402';
  2263.               $89:name:='Cirrus CL-GD5402 r1';
  2264.               $8A:name:='Cirrus CL-GD5420';
  2265.               $8B:name:='Cirrus CL-GD5420 r1';
  2266.          $8C..$8F:name:='Cirrus CL-GD5422';
  2267.          $90..$93:name:='Cirrus CL-GD5426';
  2268.          $94..$97:name:='Cirrus CL-GD5424';
  2269.          $98..$9B:name:='Cirrus CL-GD5428';
  2270.          $A0..$A3:name:='Cirrus CL-GD5430';
  2271.          $A8..$AB:name:='Cirrus CL-GD5434';
  2272.         else UNK('Cirrus54',x);
  2273.         end
  2274.       else if testinx($3C4,$19) then
  2275.         case SubVers shr 6 of
  2276.           0:name:='Cirrus CL-GD6205';
  2277.           1:name:='Cirrus CL-GD6235';
  2278.           2:name:='Cirrus CL-GD6215';
  2279.           3:name:='Cirrus CL-GD6225';
  2280.         end
  2281.       else name:='Cirrus AVGA2 (5402)';
  2282.     end;
  2283.   end
  2284.   else wrinx($3C4,6,old);
  2285.  
  2286.  
  2287.   (* Now test for 64xx *)
  2288.  
  2289.   old:=rdinx($3CE,$A);
  2290.   wrinx($3CE,$A,$CE);
  2291.   if rdinx($3CE,$A)=0 then
  2292.   begin
  2293.     wrinx($3CE,$A,$EC);
  2294.     if rdinx($3CE,$A)=1 then
  2295.     begin
  2296.       SubVers:=rdinx($3CE,$AA);
  2297.       case SubVers shr 4 of
  2298.         4:name:='Cirrus CL-GD6440';
  2299.         5:name:='Cirrus CL-GD6412';
  2300.         6:name:='Cirrus CL-GD5410';
  2301.         7:name:='Cirrus CL-GD6420';
  2302.         8:name:='Cirrus CL-GD6410';
  2303.       else UNK('Cirrus64')
  2304.       end;
  2305.     end;
  2306.   end;
  2307.   wrinx($3CE,$A,old);
  2308.  
  2309.   (* Now test for 5/600 *)
  2310.  
  2311.   old6:=rdinx($3C4,6);
  2312.   old:=rdinx(base,$C);
  2313.   outp(base+1,0);
  2314.   SubVers:=rdinx($3d4,$1F);
  2315.   wrinx($3C4,6,(eagle shl 4)+(eagle shr 4));
  2316.   if inp($3C5)=0 then
  2317.   begin
  2318.     outp($3C5,SubVers);
  2319.     if inp($3C5)=1 then
  2320.       case SubVers of
  2321.         $EC:Cirrus 510/520;
  2322.         $CA:Cirrus 610/620;
  2323.         $EA:Cirrus Video7 OEM;
  2324.       else UNK(Cirrus)
  2325.       end;
  2326.   end;
  2327.   wrinx(base,$C,old);
  2328.   wrinx($3C4,6,old6);
  2329.  
  2330.  
  2331.  
  2332.   Modes for the GD 5320:
  2333.  
  2334.   18h T  132   25   2
  2335.   19h T  132   34   2
  2336.   1Ah T  132   44   2
  2337.   1Ch T  132   25  16
  2338.   1Dh T  132   43  16
  2339.   1Eh T  132   44  16
  2340.   23h T  132   25  16
  2341.   24h T  132   28  16
  2342.   25h G  640  480  16  PL4
  2343.   29h G  800  600  16  PL4
  2344.   2Dh G  640  350 256  P8
  2345.   60h T  132   25
  2346.   61h G  640  400  16  PL4
  2347.   61h T  132   50              HUH ??
  2348.   62h G  640  450  16  PL4
  2349.   70h G  360  480 256  P8
  2350.   71h G  528  400 256  P8
  2351.   72h G  528  480 256  P8
  2352.   74h G  320  240 256  P8
  2353.   75h G  640  400 256  P8
  2354.  
  2355.  
  2356.   Modes for the GD 54xx:
  2357.  
  2358.   14h T  132   25  16 (8x16)
  2359.   54h T  132   43  16 (8x8)
  2360.   55h T  132   25  16 (8x14)
  2361.   56h T  132   43   2           (5402 only)
  2362.   57h T  132   25   2           (5402 only)
  2363.   58h G  800  600  16  PL4
  2364.   59h G  800  600   2           (5402 only)
  2365.   5Ch G  800  600 256  P8
  2366.   5Dh G 1024  768  16  PL4
  2367.   5Eh G  640  400 256  P8       (5402 only)
  2368.   5Fh G  640  480 256  P8
  2369.   60h G 1024  768 256  P8
  2370.   64h G  640  480 64K  P16
  2371.   65h G  800  600 64K  P16
  2372.   66h G  640  480 32K  P15
  2373.   67h G  800  600 32K  P15
  2374.   68h G 1024  768 32K  P15      5452 only ?
  2375.   69h G 1280 1024 32K  P15      5452 only ?
  2376.   6Ah G  800  600  16  PL4
  2377.   6Ch G 1280 1024  16  PL4
  2378.   6Dh G 1280 1024 256  P8
  2379.   6Fh G  320  200 64K  P16
  2380.   70h G  320  200 16M  P24
  2381.   71h G  640  480 16M  P24
  2382.   72h G  800  600 16M  P32      543x/52 only
  2383.   73h G 1024  768 16M  P32      543x/52 only
  2384.   74h G 1024  768 64K  P16
  2385.   75h G 1280 1024 64K  P16
  2386.   76h G  640  480 16M  P32      543x/52 only
  2387.   77h G 1280 1024 16M  P24      543x/52 only
  2388.   78h G 1600 1200 256  P8       543x/52 only
  2389.   79h G 1152  870 16M  P32      543x/52 only
  2390.  
  2391.  
  2392. -- BIOS extensions --
  2393. ----------1012-80----------------------------------
  2394. INT 10 - VIDEO Cirrus Logic - Inquire VGA Type
  2395.         AH = 12h
  2396.         BL = 80h
  2397. Return: AL = Chip ID:
  2398.                2   CL-GD 510/520
  2399.                3   CL-GD 610/620
  2400.                4   CL-GD 5320
  2401.                5   CL-GD 6410
  2402.                6   CL-GD 5410
  2403.                7   CL-GD 6420
  2404.                8   CL-GD 6412
  2405.                9   CL-GD 6416
  2406.               10h  CL-GD 5401
  2407.               11h  CL-GD 5402
  2408.               12h  CL-GD 5420
  2409.               13h  CL-GD 5422
  2410.               14h  CL-GD 5424
  2411.               15h  CL-GD 5426
  2412.               16h  CL-GD 5420 rev 1
  2413.               17h  CL-GD 5402 rev 1
  2414.               18h  CL-GD 5428
  2415.               19h  CL-GD 5429
  2416.               20h  CL-GD 6205
  2417.               21h  CL-GD 6215
  2418.               22h  CL-GD 6225
  2419.               23h  CL-GD 6235
  2420.               24h  CL-GD 6245
  2421.               30h  CL-GD 5432
  2422.               31h  CL-GD 5434
  2423.               32h  CL-GD 5430
  2424.               33h  CL-GD 5434 (.6 micron)
  2425.               40h  CL-GD 6440
  2426.               41h  CL-GD 7542 (Nordic)
  2427.               42h  CL-GD 7543 (Viking)
  2428.               43h  CL-GD 7541 (Nordic Lite)
  2429.               52h  CL-GD 5452 (Northstar)
  2430.         BL = Silicon Revision number (bit 7 set if not available)
  2431.         BH = bit 2 set if using CL-GD 6340 LCD interface
  2432. ----------1012-81---------------------------------------
  2433. INT 10 - VIDEO - Cirrus Logic - Inquire BIOS Version Number
  2434.         AH = 12h
  2435.         BL = 81h
  2436. Return: AH = Major Version
  2437.         AL = Minor Version
  2438. ----------1012-82---------------------------------------
  2439. INT 10 - VIDEO - Cirrus Logic - Inquire Cirrus Logic Design Revision Code
  2440.         AH = 12h
  2441.         BL = 82h
  2442. Return: AL = Chip Revision
  2443.         AH = ??
  2444. ----------1012--BL84-------------------------
  2445. INT 10 - Cirrus Logic BIOS v3.02 - Inquire Options
  2446.         AH = 12h
  2447.         BL = 84h
  2448. Return: AX = user options word (see #0029)
  2449.              bit 0-1  centering. 00 vertical centered, 01 from bottom,
  2450.                                  10 from top, 11 reserved
  2451.                  2-3  720-dot fix-up options
  2452.                        00 OR every 8th and 9th pixel
  2453.                        01 display MGA mode from left
  2454.                        10 display MGA mode from right
  2455.                        11 skip every 9th pixel
  2456.                  5-7  video mode (001 CGA, 010 MGA, 011 EGA, 100 VGA)
  2457.                    8  external monitor enabled instead of LCD panel
  2458.                    9  vertical expand mode enabled
  2459.                   10  8-bit mode instead of 16-bit mode
  2460.                   11  normal video rather than reverse video (for LCD)
  2461.                   12  attribute automap rather than attribute emulation
  2462.                   13  bold mode disabled (default)
  2463.                   14  fast bandwidth
  2464. ----------1012-85---------------------------------------
  2465. INT 10 - VIDEO - Cirrus Logic - Return Installed Memory
  2466.         AH = 12h
  2467.         BL = 85h
  2468. Return: AL = Video Memory in 64K units
  2469. ----------1012--BL89-------------------------
  2470. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - En/Disable Reverse Video Mode
  2471.         AH = 12h
  2472.         BL = 89h
  2473.         AL = new state (00h enabled, 01h disabled)
  2474. ----------1012--BL8A-------------------------
  2475. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Set Frame Color
  2476.         AH = 12h
  2477.         BL = 8Ah
  2478.         AL = new grey-scale color (00h = black to 0Fh = white)
  2479. ----------1012--BL8B-------------------------
  2480. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Enable/Disable Bold Mode
  2481.         AH = 12h
  2482.         BL = 8Bh
  2483.         AL = new state (00h enabled, 01h disabled)
  2484. ----------1012--BL8C-------------------------
  2485. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Set Automap/Emulate Attributes
  2486.         AH = 12h
  2487.         BL = 8Ch
  2488.         AL = new state
  2489.              00h enable automap
  2490.              01h disable automap and emulate attributes
  2491. ----------1012--BL8F-------------------------
  2492. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Enable/Disable Expand Mode
  2493.         AH = 12h
  2494.         BL = 8Fh
  2495.         AL = new state (00h enabled, 01h disabled)
  2496. Note: when expand mode is enabled, the vertical dimension is enlarged to
  2497.       full screen
  2498. ----------1012--BL90-------------------------
  2499. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Set Centering Mode
  2500.         AH = 12h
  2501.         BL = 90h
  2502.         AL = new position
  2503.               00h centered
  2504.               01h from top
  2505.               02h from bottom
  2506.               03h from top
  2507. ----------1012--BL91-------------------------
  2508. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Set 720-Dot Fixup Mode
  2509.         AH = 12h
  2510.         BL = 91h
  2511.         AL = new mode
  2512.               00h display MGA mode from left of screen (default)
  2513.               01h display MGA from right
  2514.               02h skip every ninth pixel
  2515.               03h OR every 8th and 9th pixel
  2516. ----------1012--BL92-------------------------
  2517. INT 10 - Cirrus Logic BIOS v3.02 - LCD panel - Switch Display
  2518.         AH = 12h
  2519.         BL = 92h
  2520.         AL = new display (00h LCD, 01h external monitor)
  2521. Note: the deselected display is disabled
  2522. ----------1012-93---------------------------------------
  2523. INT 10 - VIDEO - Cirrus Logic - Force 8bit OR 16bit Operation
  2524.         AH = 12h
  2525.         BL = 93h
  2526.         AL = New I/O width (00h = 16bits, 01h = 8bits).
  2527. ----------1012--BL94-------------------------
  2528. INT 10 - Cirrus Logic BIOS v3.02 - Power Conservation
  2529.         AH = 12h
  2530.         BL = 94h
  2531.         AL = new state (00h wake up monitor, 01h shut down display)
  2532. Note: AL=01h is reported not to work properly on the LCD panel
  2533. ----------1012-9A---------------------------------------
  2534. INT 10 - VIDEO - Cirrus Logic - GET USER OPTIONS
  2535.         AH = 12h
  2536.         BL = 9Ah
  2537. Return: AX = Options Word 1:
  2538.              Bit 2-4  Monitor type
  2539.                  5-6  Maximum Vertical Resolution
  2540.                   10  Force 8bit operation (0=16bit, 1=8bit))
  2541.                   14  Vertical Refresh Frequency at 640x480
  2542.         CX = Options Word 2:
  2543.              Bit 4-5  Vertical Refresh Frequency at 1280x1024
  2544.                11-12  Vertical Refresh Frequency at 800x600
  2545.                13-15  Vertical Refresh Frequency at 1024x768
  2546. ----------1012-A0---------------------------------------
  2547. INT 10 - VIDEO - Cirrus Logic - Get Video Mode Availability
  2548.         AH = 12h
  2549.         AL = Video mode number
  2550.         BL = A0h
  2551. Return: AH = Bit 0: Video mode supported if set
  2552.         BX = Offset of BIOS subrutine to fixup standard video parameters.
  2553.              (Call subrutine with DS:SI and ES:DI as returned by this call)
  2554.         DS:SI -> Standard Video Parameters or FFFFh:FFFFh
  2555.         ES:DI -> Supplemental Video Parameters or FFFFh:FFFFh
  2556. ----------1012-A1---------------------------------------
  2557. INT 10 - VIDEO - Cirrus Logic - Read Monitor Type Ana ID From 15Pin Connector
  2558.         AH = 12h
  2559.         BL = A1h
  2560. Return: BH = Monitor ID:
  2561.                00h-08h  Reserved
  2562.                    09h  IBM 8604/8507
  2563.                    0Ah  IBM 8514
  2564.                    0Bh  IBM 8515
  2565.                    0Dh  IBM 8503
  2566.                    0Eh  IBM 8512/8513
  2567.                    0Fh  no monitor
  2568.         BL = Monitor Type. 00h: Color, 01h: Grayscale, 02h: No Display
  2569. ----------1012-A2---------------------------------------
  2570. INT 10 - VIDEO - Cirrus Logic - Set Monitor Horizontal Retrace Frequency
  2571.         AH = 12h
  2572.         BL = A2h
  2573.         AL = Monitor Type
  2574.                00h  Standard VGA
  2575.                01h  8514-compatible                (31.5 + 35.5 kHz)
  2576.                02h  SuperVGA                       (31.5 - 35.1 kHz)
  2577.                03h  Extended SuperVGA              (31.5 - 35.5 kHz)
  2578.                04h  multi-frequency                (31.5 - 37.8 kHz)
  2579.                05h  extended multi-frequency       (31.5 - 48.0 kHz)
  2580.                06h  super multi-frequency          (31.5 - 56.0 kHz)
  2581.                07h  extended super multi-frequency (31.5 - 64.0 kHz)
  2582. ----------1012-A3---------------------------------------
  2583. INT 10 - VIDEO - Cirrus Logic - Set VGA Refresh
  2584.         AH = 12h
  2585.         BL = A3h
  2586.         AL = refresh rate for 640x480 (00h normal, 01h high)
  2587. ----------1012-A4---------------------------------------
  2588. INT 10 - VIDEO - Cirrus Logic - Set Monitor Type
  2589.         AH = 12h
  2590.         BL = A4h
  2591.         AL = Bits 0-3  Maximum Vertical Resolution
  2592.                          0: 480, 1: 600, 2: 768, 3: 1024
  2593.                   4-7  Vertical Refresh at 640x480:
  2594.                          0: 60Hz, 1: 72Hz
  2595.         BH = Bits 0-3  Vertical Refresh at 800x600:
  2596.                          0: 56Hz, 1: 60Hz, 2: 72Hz
  2597.                   4-7  Vertical Refresh at 1024x768:
  2598.                         0: 87Hz interlaced, 1: 60Hz, 2: 70Hz, 3: 72Hz, 4: 76Hz
  2599.         CH = Bits 4-7  Vertical Refresh at 1280x1024:
  2600.                          0: 87Hz interlaced, 1: 60Hz, 2: 70Hz
  2601.  
  2602. Many other functions exist in the range BL = 80h - A3h
  2603.